mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix/buried new cards shouldn't be counted in daily load (#3530)
* Fix/buried new cards shouldn't be counted in daily load * exclude new cards by its type * ./ninja format
This commit is contained in:
parent
8ebb274ff2
commit
0ce907fe5b
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ use anki_proto::stats::graphs_response::FutureDue;
|
||||||
|
|
||||||
use super::GraphsContext;
|
use super::GraphsContext;
|
||||||
use crate::card::CardQueue;
|
use crate::card::CardQueue;
|
||||||
|
use crate::card::CardType;
|
||||||
use crate::scheduler::timing::is_unix_epoch_timestamp;
|
use crate::scheduler::timing::is_unix_epoch_timestamp;
|
||||||
|
|
||||||
impl GraphsContext {
|
impl GraphsContext {
|
||||||
|
@ -26,7 +27,9 @@ impl GraphsContext {
|
||||||
due - (self.days_elapsed as i32)
|
due - (self.days_elapsed as i32)
|
||||||
};
|
};
|
||||||
|
|
||||||
daily_load += 1.0 / c.interval.max(1) as f32;
|
if c.ctype != CardType::New {
|
||||||
|
daily_load += 1.0 / c.interval.max(1) as f32;
|
||||||
|
}
|
||||||
|
|
||||||
// still want to filtered out buried cards that are due today
|
// still want to filtered out buried cards that are due today
|
||||||
if due_day == 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) {
|
if due_day == 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) {
|
||||||
|
|
Loading…
Reference in a new issue