mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🎨 Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564
This commit is contained in:
parent
20796c7392
commit
bbeb6282d6
1 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) {
|
||||||
case "notebook":
|
case "notebook":
|
||||||
for i := 1; ; i++ {
|
for i := 1; ; i++ {
|
||||||
pagedBlocks, _, _ := GetNotebookFlashcards(id, i)
|
pagedBlocks, _, _ := GetNotebookFlashcards(id, i)
|
||||||
if 1 > len(blocks) {
|
if 1 > len(pagedBlocks) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
blocks = append(blocks, pagedBlocks...)
|
blocks = append(blocks, pagedBlocks...)
|
||||||
|
|
@ -63,7 +63,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) {
|
||||||
case "tree":
|
case "tree":
|
||||||
for i := 1; ; i++ {
|
for i := 1; ; i++ {
|
||||||
pagedBlocks, _, _ := GetTreeFlashcards(id, i)
|
pagedBlocks, _, _ := GetTreeFlashcards(id, i)
|
||||||
if 1 > len(blocks) {
|
if 1 > len(pagedBlocks) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
blocks = append(blocks, pagedBlocks...)
|
blocks = append(blocks, pagedBlocks...)
|
||||||
|
|
@ -74,7 +74,7 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) {
|
||||||
case "deck":
|
case "deck":
|
||||||
for i := 1; ; i++ {
|
for i := 1; ; i++ {
|
||||||
pagedBlocks, _, _ := GetDeckFlashcards(id, i)
|
pagedBlocks, _, _ := GetDeckFlashcards(id, i)
|
||||||
if 1 > len(blocks) {
|
if 1 > len(pagedBlocks) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
blocks = append(blocks, pagedBlocks...)
|
blocks = append(blocks, pagedBlocks...)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue