Update is_due_in_days logic to include original or current due date check

This commit is contained in:
Jarrett Ye 2025-07-28 15:10:47 +08:00
parent aecff39b6f
commit ab7965d3d5
No known key found for this signature in database
GPG key ID: EBFC55E0C1A352BB

View file

@ -105,7 +105,8 @@ impl Card {
/// Returns true if the card has a due date in terms of days. /// Returns true if the card has a due date in terms of days.
fn is_due_in_days(&self) -> bool { fn is_due_in_days(&self) -> bool {
matches!(self.queue, CardQueue::DayLearn | CardQueue::Review) self.original_or_current_due() <= 365_000 // keep consistent with SQL
|| matches!(self.queue, CardQueue::DayLearn | CardQueue::Review)
|| (self.ctype == CardType::Review && self.is_undue_queue()) || (self.ctype == CardType::Review && self.is_undue_queue())
} }