mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
don't ignore buried cards in future due graph (#3368)
it does ignore them for the current day but not days in the future
This commit is contained in:
parent
a6d5c94997
commit
7ea573b004
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ use std::collections::HashMap;
|
||||||
use anki_proto::stats::graphs_response::FutureDue;
|
use anki_proto::stats::graphs_response::FutureDue;
|
||||||
|
|
||||||
use super::GraphsContext;
|
use super::GraphsContext;
|
||||||
|
use crate::card::CardQueue;
|
||||||
use crate::scheduler::timing::is_unix_epoch_timestamp;
|
use crate::scheduler::timing::is_unix_epoch_timestamp;
|
||||||
|
|
||||||
impl GraphsContext {
|
impl GraphsContext {
|
||||||
|
@ -13,7 +14,7 @@ impl GraphsContext {
|
||||||
let mut have_backlog = false;
|
let mut have_backlog = false;
|
||||||
let mut due_by_day: HashMap<i32, u32> = Default::default();
|
let mut due_by_day: HashMap<i32, u32> = Default::default();
|
||||||
for c in &self.cards {
|
for c in &self.cards {
|
||||||
if c.queue as i8 <= 0 {
|
if matches!(c.queue, CardQueue::New | CardQueue::Suspended) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let due = c.original_or_current_due();
|
let due = c.original_or_current_due();
|
||||||
|
@ -24,6 +25,10 @@ impl GraphsContext {
|
||||||
due - (self.days_elapsed as i32)
|
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;
|
have_backlog |= due_day < 0;
|
||||||
*due_by_day.entry(due_day).or_default() += 1;
|
*due_by_day.entry(due_day).or_default() += 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue