From 1c033bf023da538eb30eca0d3fc494dd384d4c92 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 21 May 2019 12:34:23 +0200 Subject: [PATCH 1/2] MOBILE-3039 local-notif: Fix event listening In the plugin documentation it says there is an event named 'add', but in Ionic Native is called 'schedule' --- src/providers/local-notifications.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/providers/local-notifications.ts b/src/providers/local-notifications.ts index 5417b5ff3..308ffb4c7 100644 --- a/src/providers/local-notifications.ts +++ b/src/providers/local-notifications.ts @@ -136,8 +136,8 @@ export class CoreLocalNotificationsProvider { this.handleEvent('cancel', notification); }); - this.addSubscription = localNotifications.on('add').subscribe((notification: ILocalNotification) => { - this.handleEvent('add', notification); + this.addSubscription = localNotifications.on('schedule').subscribe((notification: ILocalNotification) => { + this.handleEvent('schedule', notification); }); this.updateSubscription = localNotifications.on('update').subscribe((notification: ILocalNotification) => { From 1647cad957e2942302c852f0dda1e5f512c5e869 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 21 May 2019 12:54:31 +0200 Subject: [PATCH 2/2] MOBILE-3039 message: Fix confirm delete self conv messages --- src/addon/messages/pages/discussion/discussion.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/addon/messages/pages/discussion/discussion.ts b/src/addon/messages/pages/discussion/discussion.ts index 96548bee7..853494ce1 100644 --- a/src/addon/messages/pages/discussion/discussion.ts +++ b/src/addon/messages/pages/discussion/discussion.ts @@ -811,7 +811,8 @@ export class AddonMessagesDiscussionPage implements OnDestroy { */ deleteMessage(message: any, index: number): void { const canDeleteAll = this.conversation && this.conversation.candeletemessagesforallusers, - langKey = message.pending || canDeleteAll ? 'core.areyousure' : 'addon.messages.deletemessageconfirmation', + langKey = message.pending || canDeleteAll || this.isSelf ? 'core.areyousure' : + 'addon.messages.deletemessageconfirmation', options: any = {}; if (canDeleteAll && !message.pending) {