fix handling of due reviews in filtered deck+future due graph

This commit is contained in:
Damien Elmes 2020-07-26 10:28:56 +10:00
parent dbbdd16f0f
commit 15c9cd9108

View file

@ -29,7 +29,14 @@ export function gatherData(data: pb.BackendProto.GraphsOut): GraphData {
// or learning cards due today // or learning cards due today
(c.queue == CardQueue.Learn && c.due < data.nextDayAtSecs) (c.queue == CardQueue.Learn && c.due < data.nextDayAtSecs)
) )
.map((c) => (c.queue == CardQueue.Learn ? 0 : c.due - data.daysElapsed)); .map((c) => {
if (c.queue == CardQueue.Learn) {
return 0;
} else {
const due = c.odid ? c.odue : c.due;
return due - data.daysElapsed;
}
});
const dueCounts = rollup( const dueCounts = rollup(
due, due,