From d81dfc503c37666eab7170dcd8ecee078345479b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 17 Nov 2023 00:05:30 +0800 Subject: [PATCH] :art: Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564 --- kernel/model/flashcard.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index 9cc7a7f60..7ec61925d 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -44,6 +44,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) { if 0 < len(blockIDs) { if "" == deckID { + // 从全局管理进入时不会指定卡包 ID,这时需要遍历所有卡包 for _, deck := range Decks { allBlockIDs := deck.GetBlockIDs() for _, blockID := range blockIDs { @@ -53,6 +54,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) { } } if "" == deckID { + logging.LogWarnf("deck not found for blocks [%s]", strings.Join(blockIDs, ",")) continue } resetFlashcards(deckID, blockIDs)