diff --git a/src/addon/notifications/pages/list/list.ts b/src/addon/notifications/pages/list/list.ts index e9634d095..9031abdc0 100644 --- a/src/addon/notifications/pages/list/list.ts +++ b/src/addon/notifications/pages/list/list.ts @@ -121,7 +121,7 @@ export class AddonNotificationsListPage { // Check if mark all notifications as read is enabled and there are some to read. if (this.notificationsProvider.isMarkAllNotificationsAsReadEnabled()) { promises.push(this.notificationsProvider.getUnreadNotificationsCount().then((unread) => { - this.canMarkAllNotificationsAsRead = unread > 0 + this.canMarkAllNotificationsAsRead = unread > 0; })); } else { this.canMarkAllNotificationsAsRead = false; diff --git a/src/addon/notifications/providers/notifications.ts b/src/addon/notifications/providers/notifications.ts index d7a1bde1b..bbd74caa4 100644 --- a/src/addon/notifications/providers/notifications.ts +++ b/src/addon/notifications/providers/notifications.ts @@ -244,10 +244,10 @@ export class AddonNotificationsProvider { const params = { useridto: this.sitesProvider.getCurrentSiteUserId() }; + return this.sitesProvider.getCurrentSite().write('core_message_mark_all_notifications_as_read', params); } - /** * Mark message notification as read. *