Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

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

Liang Ding5f875e9db209
diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go
index 8afc132a49..7198120847 100644
--- a/kernel/model/flashcard.go
+++ b/kernel/model/flashcard.go
@@ -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) {