This commit is contained in:
Jarrett Ye 2025-09-24 01:43:11 +00:00 committed by GitHub
commit 8ec11c945d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,8 +76,15 @@ impl Collection {
note_id: card.note_id.into(), note_id: card.note_id.into(),
deck: deck.human_name(), deck: deck.human_name(),
added: card.id.as_secs().0, added: card.id.as_secs().0,
first_review: revlog.first().map(|entry| entry.id.as_secs().0), first_review: revlog
latest_review: revlog.last().map(|entry| entry.id.as_secs().0), .iter()
.find(|entry| entry.has_rating())
.map(|entry| entry.id.as_secs().0),
// last_review_time is not used to ensure cram revlogs are included.
latest_review: revlog
.iter()
.rfind(|entry| entry.has_rating())
.map(|entry| entry.id.as_secs().0),
due_date: self.due_date(&card)?, due_date: self.due_date(&card)?,
due_position: self.position(&card), due_position: self.position(&card),
interval: card.interval, interval: card.interval,