mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
include learning cards due today in future due graph
This commit is contained in:
parent
c3266ea060
commit
796696afde
1 changed files with 9 additions and 2 deletions
|
@ -22,8 +22,15 @@ export interface GraphData {
|
|||
|
||||
export function gatherData(data: pb.BackendProto.GraphsOut): GraphData {
|
||||
const due = (data.cards as pb.BackendProto.Card[])
|
||||
.filter((c) => [CardQueue.Review, CardQueue.DayLearn].includes(c.queue))
|
||||
.map((c) => c.due - data.daysElapsed);
|
||||
.filter(
|
||||
(c) =>
|
||||
// reviews
|
||||
[CardQueue.Review, CardQueue.DayLearn].includes(c.queue) ||
|
||||
// or learning cards due today
|
||||
(c.queue == CardQueue.Learn && c.due < data.nextDayAtSecs)
|
||||
)
|
||||
.map((c) => (c.queue == CardQueue.Learn ? 0 : c.due - data.daysElapsed));
|
||||
|
||||
const dueCounts = rollup(
|
||||
due,
|
||||
(v) => v.length,
|
||||
|
|
Loading…
Reference in a new issue