From c8275257ce4f507cf3292d6d4d7185d05088e310 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 20 Jan 2023 00:18:13 +1000 Subject: [PATCH] Probable fix for future due graph Cards due earlier today will have a negative offset like -78000(secs). The old typescript code was using floating point division to yield -1; with integer division we get 0 instead. https://forums.ankiweb.net/t/wrong-info-when-hovering-over-future-due-graph/26522 --- rslib/src/stats/graphs/future_due.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/stats/graphs/future_due.rs b/rslib/src/stats/graphs/future_due.rs index 58b446178..0c987a300 100644 --- a/rslib/src/stats/graphs/future_due.rs +++ b/rslib/src/stats/graphs/future_due.rs @@ -23,7 +23,7 @@ impl GraphsContext { }; let due_day = if c.is_intraday_learning() { let offset = due as i64 - self.next_day_start.0; - ((offset / 86_400) + 1) as i32 + (offset / 86_400) as i32 } else { due - (self.days_elapsed as i32) };