mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-08-03 04:52:12 +00:00
feat(schedule): refresh current time badge too
This commit is contained in:
parent
58a10b12a6
commit
763b201dad
3 changed files with 6 additions and 6 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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<string[]>): Signal<ScheduleDay[]> {
|
||||
return computed(() => {
|
||||
this._scheduleRefreshTick();
|
||||
this.scheduleRefreshTick();
|
||||
const timelineTasks = this._timelineTasks();
|
||||
const taskRepeatCfgs = this._taskRepeatCfgs();
|
||||
const timelineCfg = this._timelineConfig();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue