diff --git a/rslib/src/stats/graphs/future_due.rs b/rslib/src/stats/graphs/future_due.rs index ef7da2ad3..4671766e5 100644 --- a/rslib/src/stats/graphs/future_due.rs +++ b/rslib/src/stats/graphs/future_due.rs @@ -6,6 +6,7 @@ use std::collections::HashMap; use anki_proto::stats::graphs_response::FutureDue; use super::GraphsContext; +use crate::card::CardQueue; use crate::scheduler::timing::is_unix_epoch_timestamp; impl GraphsContext { @@ -13,7 +14,7 @@ impl GraphsContext { let mut have_backlog = false; let mut due_by_day: HashMap = Default::default(); for c in &self.cards { - if c.queue as i8 <= 0 { + if matches!(c.queue, CardQueue::New | CardQueue::Suspended) { continue; } let due = c.original_or_current_due(); @@ -24,6 +25,10 @@ impl GraphsContext { due - (self.days_elapsed as i32) }; + // still want to filtered out buried cards that are due today + if due_day == 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) { + continue; + } have_backlog |= due_day < 0; *due_by_day.entry(due_day).or_default() += 1; }