mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
Fixed overlapping ranges when all history is selected and days calcolation to prevent overlapping labels
This commit is contained in:
parent
9facea0a66
commit
0abac06c39
3 changed files with 9 additions and 2 deletions
|
|
@ -255,6 +255,7 @@ Ranjit Odedra <ranjitodedra.dev@gmail.com>
|
|||
Eltaurus <https://github.com/Eltaurus-Lt>
|
||||
jariji
|
||||
Francisco Esteva <fr.esteva@duocuc.cl>
|
||||
Junia Mannervik <junia.mannervik@gmail.com>
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
|||
|
|
@ -178,9 +178,11 @@ export function dayLabel(daysStart: number, daysEnd: number): string {
|
|||
daysEnd: daysEnd - 1,
|
||||
});
|
||||
} else {
|
||||
const mostRecent = daysEnd <= 0 ? Math.abs(daysEnd - 1) : 0;
|
||||
const oldest = -daysStart;
|
||||
return tr.statisticsDaysAgoRange({
|
||||
daysStart: Math.abs(daysEnd - 1),
|
||||
daysEnd: -daysStart,
|
||||
daysStart: mostRecent,
|
||||
daysEnd: oldest,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,6 +118,10 @@ export function renderCalendar(
|
|||
// don't fill out future dates
|
||||
continue;
|
||||
}
|
||||
if (date.getFullYear() != targetYear) {
|
||||
// only fill blanks for the target year
|
||||
continue;
|
||||
}
|
||||
if (revlogRange == RevlogRange.Year && date < oneYearAgoFromNow) {
|
||||
// don't fill out dates older than a year
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue