mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 11:30:42 +08: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
@ -70,9 +70,14 @@ type RiffCard struct {
|
||||
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{
|
||||
Due: card.Due,
|
||||
Due: due,
|
||||
Reps: card.Reps,
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ func getCardsBlocks(cards []riff.Card, page int) (blocks []*Block, total, pageCo
|
||||
}
|
||||
|
||||
b.RiffCardID = cards[i].ID()
|
||||
b.RiffCard = GetRiffCard(cards[i].(*riff.FSRSCard).C)
|
||||
b.RiffCard = getRiffCard(cards[i].(*riff.FSRSCard).C)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user