From 8abc00f7f958c0f0455f9571fd0ab37251a84d66 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 9 May 2023 10:28:00 +0800 Subject: [PATCH] :art: Show count in spaced repetition tree filter floating window https://github.com/siyuan-note/siyuan/issues/8202 --- kernel/model/flashcard.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index 7e8022c74..78134b500 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -59,8 +59,8 @@ func GetFlashcardNotebooks() (ret []*Box) { func countTreeFlashcard(rootID string, deck *riff.Deck, deckBlockIDs []string) (newFlashcardCount, dueFlashcardCount, flashcardCount int) { blockIDs := getTreeSubTreeChildBlocks(rootID) - for _, blockID := range deckBlockIDs { - if gulu.Str.Contains(blockID, blockIDs) { + for _, deckBlockID := range deckBlockIDs { + if gulu.Str.Contains(deckBlockID, blockIDs) { flashcardCount++ } } @@ -77,8 +77,8 @@ func countTreeFlashcard(rootID string, deck *riff.Deck, deckBlockIDs []string) ( func countBoxFlashcard(boxID string, deck *riff.Deck, deckBlockIDs []string) (newFlashcardCount, dueFlashcardCount, flashcardCount int) { blockIDs := getBoxBlocks(boxID) - for _, blockID := range deckBlockIDs { - if gulu.Str.Contains(blockID, blockIDs) { + for _, deckBlockID := range deckBlockIDs { + if gulu.Str.Contains(deckBlockID, blockIDs) { flashcardCount++ } }