mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Exclude new cards from Future Due stats (#3576)
* Exclude new cards from Future Due stats
https://github.com/ankitects/anki/pull/3530#issuecomment-2439924619
Before 7ea573b004
, they were excluded anyway.
* Update future_due.rs
* Update comment
* Minor simplification
This commit is contained in:
parent
2cbb648456
commit
db1280e6ae
1 changed files with 6 additions and 4 deletions
|
@ -16,7 +16,11 @@ impl GraphsContext {
|
|||
let mut due_by_day: HashMap<i32, u32> = Default::default();
|
||||
let mut daily_load = 0.0;
|
||||
for c in &self.cards {
|
||||
if matches!(c.queue, CardQueue::New | CardQueue::Suspended) {
|
||||
// matched on type because queue changes on burying or suspending a new card
|
||||
if c.ctype == CardType::New {
|
||||
continue;
|
||||
}
|
||||
if c.queue == CardQueue::Suspended {
|
||||
continue;
|
||||
}
|
||||
let due = c.original_or_current_due();
|
||||
|
@ -27,9 +31,7 @@ impl GraphsContext {
|
|||
due - (self.days_elapsed as i32)
|
||||
};
|
||||
|
||||
if c.ctype != CardType::New {
|
||||
daily_load += 1.0 / c.interval.max(1) as f32;
|
||||
}
|
||||
daily_load += 1.0 / c.interval.max(1) as f32;
|
||||
|
||||
// still want to filtered out buried cards that are due today
|
||||
if due_day <= 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) {
|
||||
|
|
Loading…
Reference in a new issue