mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Improve flashcard management sorting https://github.com/siyuan-note/siyuan/issues/14686
This commit is contained in:
parent
bc6843417a
commit
4c7d421d05
1 changed files with 6 additions and 0 deletions
|
|
@ -387,6 +387,12 @@ func getCardsBlocks(cards []riff.Card, page, pageSize int) (blocks []*Block, tot
|
|||
sort.Slice(cards, func(i, j int) bool {
|
||||
due1 := cards[i].(*riff.FSRSCard).C.Due
|
||||
due2 := cards[j].(*riff.FSRSCard).C.Due
|
||||
if due1.IsZero() || due2.IsZero() {
|
||||
// Improve flashcard management sorting https://github.com/siyuan-note/siyuan/issues/14686
|
||||
cid1 := cards[i].ID()
|
||||
cid2 := cards[j].ID()
|
||||
return cid1 < cid2
|
||||
}
|
||||
return due1.Before(due2)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue