mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Use original due date for learning cards as well in the future due graph
Closes #1735
This commit is contained in:
parent
bf20353b53
commit
5dab7ed47e
1 changed files with 6 additions and 6 deletions
|
@ -45,16 +45,16 @@ export function gatherData(data: Stats.GraphsResponse): GraphData {
|
|||
);
|
||||
})
|
||||
.map((c: Cards.Card) => {
|
||||
let dueDay: number;
|
||||
// - testing just odue fails on day 1
|
||||
// - testing just odid fails on lapsed cards that
|
||||
// have due calculated at regraduation time
|
||||
const due = c.originalDeckId && c.originalDue ? c.originalDue : c.due;
|
||||
|
||||
let dueDay: number;
|
||||
if (isLearning(c)) {
|
||||
const offset = c.due - data.nextDayAtSecs;
|
||||
const offset = due - data.nextDayAtSecs;
|
||||
dueDay = Math.floor(offset / 86_400) + 1;
|
||||
} else {
|
||||
// - testing just odue fails on day 1
|
||||
// - testing just odid fails on lapsed cards that
|
||||
// have due calculated at regraduation time
|
||||
const due = c.originalDeckId && c.originalDue ? c.originalDue : c.due;
|
||||
dueDay = due - data.daysElapsed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue