🎨 改进闪卡存储数据结构,支持一个块对应多张闪卡 https://github.com/siyuan-note/siyuan/issues/7417

This commit is contained in:
Liang Ding 2023-02-24 23:28:27 +08:00
parent 127327060f
commit 5f875e9db2
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -314,7 +314,6 @@ func getDueFlashcards(deckID string) (ret []*Flashcard) {
}
func getAllDueFlashcards() (ret []*Flashcard) {
blockIDs := map[string]bool{}
now := time.Now()
for _, deck := range Decks {
cards := deck.Dues()
@ -324,10 +323,6 @@ func getAllDueFlashcards() (ret []*Flashcard) {
continue
}
if blockIDs[blockID] {
continue
}
nextDues := map[riff.Rating]string{}
for rating, due := range card.NextDues() {
nextDues[rating] = strings.TrimSpace(util.HumanizeRelTime(due, now, Conf.Lang))
@ -339,7 +334,6 @@ func getAllDueFlashcards() (ret []*Flashcard) {
BlockID: blockID,
NextDues: nextDues,
})
blockIDs[blockID] = true
}
}
if 1 > len(ret) {