This commit is contained in:
Daniel 2025-04-23 17:17:14 +08:00
parent bc6843417a
commit 4c7d421d05
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017

View File

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