fix: all-day badge shows count for visible days only
Previously showed total allDayEvents.length (all events in the loaded week). Now counts unique events that appear on at least one currently visible day column, so in 1-day view it shows that day's count, in 3-day view the count across those 3 days, etc. v1.81.12
This commit is contained in:
parent
024ceaf255
commit
091004e87e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-weekly-todo-list",
|
||||
"version": "1.81.11",
|
||||
"version": "1.81.12",
|
||||
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -5239,7 +5239,12 @@ export default function WeeklyView() {
|
||||
marginTop: "1px",
|
||||
}}
|
||||
>
|
||||
{allDayEvents.length}
|
||||
{(() => {
|
||||
const visibleDays = getVisibleDays();
|
||||
const seen = new Set<string>();
|
||||
visibleDays.forEach(d => getAllDayEventsForDate(d).forEach(e => seen.add(e.id)));
|
||||
return seen.size;
|
||||
})()}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user