Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/buried new cards shouldn't be counted in daily load #3530

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion rslib/src/stats/graphs/future_due.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use anki_proto::stats::graphs_response::FutureDue;

use super::GraphsContext;
use crate::card::CardQueue;
use crate::card::CardType;
use crate::scheduler::timing::is_unix_epoch_timestamp;

impl GraphsContext {
Expand All @@ -26,7 +27,9 @@ impl GraphsContext {
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
if due_day == 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) {
Expand Down