diff --git a/plugin/components/reminder-modal/reminder-modal.component.ts b/plugin/components/reminder-modal/reminder-modal.component.ts index 34f6ed3..7f4a4a9 100644 --- a/plugin/components/reminder-modal/reminder-modal.component.ts +++ b/plugin/components/reminder-modal/reminder-modal.component.ts @@ -75,8 +75,8 @@ export class ReminderModalComponent implements OnInit { ngOnInit(): void { this.asset = this.getAssetFromRoute(this.activatedRoute.snapshot); - this.reminder.source.id = this.asset.id; - this.reminder.source.name = String(this.asset.name) || ''; + // this.reminder.source.id = this.asset.id; + // this.reminder.source.name = String(this.asset.name) || ''; } close() { diff --git a/plugin/services/reminder.service.ts b/plugin/services/reminder.service.ts index 7ef8876..ee2f474 100644 --- a/plugin/services/reminder.service.ts +++ b/plugin/services/reminder.service.ts @@ -193,6 +193,7 @@ export class ReminderService { private handleReminderUpdate(message: Partial>): Reminder { let reminders = cloneDeep(this.reminders); + let now = moment(); if (message.realtimeAction === 'DELETE') return this.deleteRminderFromList(message, reminders); @@ -208,7 +209,7 @@ export class ReminderService { break; case 'CREATE': reminders = [...reminders, reminder]; - if (reminder.status === ReminderStatus.active) this.reminderCounter++; + if (reminder.status === ReminderStatus.active && moment(reminder.time) <= now) this.reminderCounter++; break; }