mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Fix formatting graphs ts
This commit is contained in:
parent
155a59b80b
commit
5f52367403
1 changed files with 2 additions and 3 deletions
|
@ -40,7 +40,7 @@ export function gatherData(data: pb.BackendProto.GraphsOut): GraphData {
|
||||||
let dueDay: number;
|
let dueDay: number;
|
||||||
|
|
||||||
if (isLearning(c)) {
|
if (isLearning(c)) {
|
||||||
const offset = c.due - data.nextDayAtSecs
|
const offset = c.due - data.nextDayAtSecs;
|
||||||
dueDay = Math.floor(offset / 86_400) + 1;
|
dueDay = Math.floor(offset / 86_400) + 1;
|
||||||
} else {
|
} else {
|
||||||
// - testing just odue fails on day 1
|
// - testing just odue fails on day 1
|
||||||
|
@ -48,12 +48,11 @@ export function gatherData(data: pb.BackendProto.GraphsOut): GraphData {
|
||||||
// have due calculated at regraduation time
|
// have due calculated at regraduation time
|
||||||
const due = c.originalDeckId && c.originalDue ? c.originalDue : c.due;
|
const due = c.originalDeckId && c.originalDue ? c.originalDue : c.due;
|
||||||
dueDay = due - data.daysElapsed;
|
dueDay = due - data.daysElapsed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
haveBacklog = haveBacklog || dueDay < 0;
|
haveBacklog = haveBacklog || dueDay < 0;
|
||||||
|
|
||||||
return dueDay
|
return dueDay;
|
||||||
});
|
});
|
||||||
|
|
||||||
const dueCounts = rollup(
|
const dueCounts = rollup(
|
||||||
|
|
Loading…
Reference in a new issue