From 4dfa072278f0f0f83e5b7880c976207587d755ea Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 22 Dec 2023 11:16:28 +0800 Subject: [PATCH] :art: Distinguish between new cards and review cards during spaced repetition https://github.com/siyuan-note/siyuan/issues/9377 --- kernel/model/flashcard.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index c8f60bc3d..ce4217837 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -29,7 +29,6 @@ import ( "github.com/88250/gulu" "github.com/88250/lute/ast" "github.com/88250/lute/parse" - "github.com/open-spaced-repetition/go-fsrs" "github.com/siyuan-note/filelock" "github.com/siyuan-note/logging" "github.com/siyuan-note/riff" @@ -1020,17 +1019,18 @@ func getDeckDueCards(deck *riff.Deck, reviewedCardIDs, blockIDs []string, newCar continue } - fsrsCard := c.Impl().(*fsrs.Card) - if fsrs.New == fsrsCard.State { - newCount++ + if riff.New == c.GetState() { if newCount > newCardLimit { continue } + + newCount++ } else { - reviewCount++ if reviewCount > reviewCardLimit { continue } + + reviewCount++ } if 0 < len(reviewedCardIDs) {