From bbeb6282d665665b37730af2f3fa1fc7f85d5a40 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 16 Nov 2023 23:45:50 +0800 Subject: [PATCH] :art: Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564 --- kernel/model/flashcard.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index fc88f26bc..21b377a6d 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -52,7 +52,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) { case "notebook": for i := 1; ; i++ { pagedBlocks, _, _ := GetNotebookFlashcards(id, i) - if 1 > len(blocks) { + if 1 > len(pagedBlocks) { break } blocks = append(blocks, pagedBlocks...) @@ -63,7 +63,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) { case "tree": for i := 1; ; i++ { pagedBlocks, _, _ := GetTreeFlashcards(id, i) - if 1 > len(blocks) { + if 1 > len(pagedBlocks) { break } blocks = append(blocks, pagedBlocks...) @@ -74,7 +74,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) { case "deck": for i := 1; ; i++ { pagedBlocks, _, _ := GetDeckFlashcards(id, i) - if 1 > len(blocks) { + if 1 > len(pagedBlocks) { break } blocks = append(blocks, pagedBlocks...)