mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 Show card NextDue to the flashcard management UI https://github.com/siyuan-note/siyuan/pull/9621
This commit is contained in:
parent
04bb9642f3
commit
cb45da4319
2 changed files with 8 additions and 3 deletions
|
|
@ -70,9 +70,14 @@ type RiffCard struct {
|
||||||
Reps uint64 `json:"reps"`
|
Reps uint64 `json:"reps"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetRiffCard(card *fsrs.Card) *RiffCard {
|
func getRiffCard(card *fsrs.Card) *RiffCard {
|
||||||
|
due := card.Due
|
||||||
|
if due.IsZero() {
|
||||||
|
due = time.Now()
|
||||||
|
}
|
||||||
|
|
||||||
return &RiffCard{
|
return &RiffCard{
|
||||||
Due: card.Due,
|
Due: due,
|
||||||
Reps: card.Reps,
|
Reps: card.Reps,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ func getCardsBlocks(cards []riff.Card, page int) (blocks []*Block, total, pageCo
|
||||||
}
|
}
|
||||||
|
|
||||||
b.RiffCardID = cards[i].ID()
|
b.RiffCardID = cards[i].ID()
|
||||||
b.RiffCard = GetRiffCard(cards[i].(*riff.FSRSCard).C)
|
b.RiffCard = getRiffCard(cards[i].(*riff.FSRSCard).C)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue