mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
Fix future due search missing cards on last day (#3206)
This commit is contained in:
parent
a9bf702317
commit
abacdcaeda
1 changed files with 3 additions and 2 deletions
|
@ -103,7 +103,7 @@ export function buildHistogram(
|
||||||
cumulative: number,
|
cumulative: number,
|
||||||
_percent: number,
|
_percent: number,
|
||||||
): string {
|
): string {
|
||||||
const days = dayLabel(bin.x0!, bin.x1!);
|
const days = dayLabel(bin.x0!, bin.x1 === xMax ? bin.x1! + 1 : bin.x1!);
|
||||||
const cards = tr.statisticsCardsDue({
|
const cards = tr.statisticsCardsDue({
|
||||||
cards: getNumericMapBinValue(bin as any),
|
cards: getNumericMapBinValue(bin as any),
|
||||||
});
|
});
|
||||||
|
@ -114,7 +114,8 @@ export function buildHistogram(
|
||||||
|
|
||||||
function onClick(bin: Bin<number, number>): void {
|
function onClick(bin: Bin<number, number>): void {
|
||||||
const start = bin.x0!;
|
const start = bin.x0!;
|
||||||
const end = bin.x1! - 1;
|
// x1 in last bin is inclusive
|
||||||
|
const end = bin.x1 === xMax ? bin.x1! : bin.x1! - 1;
|
||||||
const query = makeQuery(start, end);
|
const query = makeQuery(start, end);
|
||||||
dispatch("search", { query });
|
dispatch("search", { query });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue