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
This commit is contained in:
Damien Elmes 2023-01-20 00:18:13 +10:00
parent e32b3a7fe5
commit c8275257ce

View File

@ -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)
};