From 746253ce4007e3e9864f2b7790b9e1cbec5904af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 15 Nov 2022 13:36:38 +0100 Subject: [PATCH] MOBILE-3936 reminders: Fix multiple reminders set --- .../components/set-button/set-button.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/features/reminders/components/set-button/set-button.ts b/src/core/features/reminders/components/set-button/set-button.ts index 010b0baf7..11710ec32 100644 --- a/src/core/features/reminders/components/set-button/set-button.ts +++ b/src/core/features/reminders/components/set-button/set-button.ts @@ -97,15 +97,15 @@ export class CoreRemindersSetButtonComponent implements OnInit { return; } - if (timebefore === undefined || timebefore === CoreRemindersService.DISABLED) { - // Remove the reminder. - await CoreReminders.removeReminders({ - instanceId: this.instanceId, - component: this.component, - type: this.type, - }); - this.timebefore = undefined; + // Remove previous the reminders. + await CoreReminders.removeReminders({ + instanceId: this.instanceId, + component: this.component, + type: this.type, + }); + if (timebefore === undefined || timebefore === CoreRemindersService.DISABLED) { + this.timebefore = undefined; CoreDomUtils.showToast('core.reminders.reminderunset', true); return;