🎨 Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564
This commit is contained in:
parent
97c33f14d9
commit
342f764840
1 changed files with 12 additions and 2 deletions
|
@ -44,10 +44,20 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) {
|
|||
|
||||
if 0 < len(blockIDs) {
|
||||
if "" == deckID {
|
||||
for _, deck := range Decks {
|
||||
allBlockIDs := deck.GetBlockIDs()
|
||||
for _, blockID := range blockIDs {
|
||||
if gulu.Str.Contains(blockID, allBlockIDs) {
|
||||
deckID = deck.ID
|
||||
break
|
||||
}
|
||||
}
|
||||
resetFlashcards(deckID, blockIDs)
|
||||
}
|
||||
deckID = builtinDeckID
|
||||
} else {
|
||||
resetFlashcards(deckID, blockIDs)
|
||||
}
|
||||
|
||||
resetFlashcards(deckID, blockIDs)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue