From c9234dcdc42b0efc9dc89701ea3ebe69ecc754b0 Mon Sep 17 00:00:00 2001 From: Dirk Peter Date: Mon, 2 Sep 2024 08:25:37 +0200 Subject: [PATCH] fixes highlighting of changed reminders in drawer --- .../components/reminder-drawer/reminder-drawer.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts b/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts index 077ae11..e4af86a 100644 --- a/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts +++ b/src/app/reminder-plugin/components/reminder-drawer/reminder-drawer.component.ts @@ -142,12 +142,13 @@ export class ReminderDrawerComponent implements OnDestroy { } private highlightChanges(): void { - if (!this._previousState.length) return; + if (!this.reminders.length) return; // check if a reminder is new in a group this.reminderGroups.forEach((group, index) => { group.reminders.forEach((reminder) => { - if (!this._previousState[index].includes(reminder.id)) { + if (!this._previousState[index]?.includes(reminder.id)) { + console.log('highlight', reminder.id); reminder.changed = true; setTimeout( () => delete reminder.changed,