From 763b201dad2b3f549fdf2213eb7ac2bb7eca0e24 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Tue, 21 Oct 2025 16:29:35 +0200 Subject: [PATCH] feat(schedule): refresh current time badge too --- .../schedule-day-panel/schedule-day-panel.component.ts | 4 ++-- src/app/features/schedule/schedule.service.ts | 4 ++-- src/app/features/schedule/schedule/schedule.component.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/features/schedule/schedule-day-panel/schedule-day-panel.component.ts b/src/app/features/schedule/schedule-day-panel/schedule-day-panel.component.ts index 2d47fad3ff..7add44c10e 100644 --- a/src/app/features/schedule/schedule-day-panel/schedule-day-panel.component.ts +++ b/src/app/features/schedule/schedule-day-panel/schedule-day-panel.component.ts @@ -122,8 +122,8 @@ export class ScheduleDayPanelComponent implements AfterViewInit, OnDestroy { }); currentTimeRow = computed(() => { - // Trigger re-computation via today change - this._todayDateStr(); + // Trigger re-computation every 2 minutes + this._scheduleService.scheduleRefreshTick(); const now = new Date(); const hours = now.getHours(); const minutes = now.getMinutes(); diff --git a/src/app/features/schedule/schedule.service.ts b/src/app/features/schedule/schedule.service.ts index af48106ae2..3c42ee5672 100644 --- a/src/app/features/schedule/schedule.service.ts +++ b/src/app/features/schedule/schedule.service.ts @@ -42,13 +42,13 @@ export class ScheduleService { private _icalEvents = toSignal(this._calendarIntegrationService.icalEvents$, { initialValue: [], }); - private _scheduleRefreshTick = toSignal(interval(2 * 60 * 1000).pipe(startWith(0)), { + scheduleRefreshTick = toSignal(interval(2 * 60 * 1000).pipe(startWith(0)), { initialValue: 0, }); createScheduleDaysComputed(daysToShow: Signal): Signal { return computed(() => { - this._scheduleRefreshTick(); + this.scheduleRefreshTick(); const timelineTasks = this._timelineTasks(); const taskRepeatCfgs = this._taskRepeatCfgs(); const timelineCfg = this._timelineConfig(); diff --git a/src/app/features/schedule/schedule/schedule.component.ts b/src/app/features/schedule/schedule/schedule.component.ts index 86a9bd5bd6..8acc39ada7 100644 --- a/src/app/features/schedule/schedule/schedule.component.ts +++ b/src/app/features/schedule/schedule/schedule.component.ts @@ -141,8 +141,8 @@ export class ScheduleComponent implements AfterViewInit { beyondBudget = computed(() => this._eventsAndBeyondBudget().beyondBudgetDays); currentTimeRow = computed(() => { - // Trigger re-computation - this.scheduleDays(); + // Trigger re-computation every 2 minutes + this.scheduleService.scheduleRefreshTick(); const now = new Date(); const hours = now.getHours(); const minutes = now.getMinutes();