MOBILE-3936 reminders: Fix multiple reminders set

main
Pau Ferrer Ocaña 2022-11-15 13:36:38 +01:00
parent d40a488758
commit 746253ce40
1 changed files with 8 additions and 8 deletions

View File

@ -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;