🎨 Show count in spaced repetition tree filter floating window https://github.com/siyuan-note/siyuan/issues/8202

This commit is contained in:
Liang Ding 2023-05-09 10:28:00 +08:00
parent 97c4e84bc4
commit 8abc00f7f9
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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++
}
}