diff --git a/src/addon/notifications/pages/settings/settings.html b/src/addon/notifications/pages/settings/settings.html index b9f76c243..b6502c2c0 100644 --- a/src/addon/notifications/pages/settings/settings.html +++ b/src/addon/notifications/pages/settings/settings.html @@ -24,8 +24,8 @@ - {{ 'core.settings.disableall' | translate }} - + {{ 'addon.notifications.notifications' | translate }} + {{ 'addon.notifications.playsound' | translate }} @@ -53,25 +53,25 @@ {{ notification.displayname }} - - - + + + -
{{'core.settings.locked' | translate }}
+
{{'core.settings.locked' | translate }}
- {{ 'core.settings.disabled' | translate }} + {{ 'core.settings.disabled' | translate }}
{{ notification.displayname }} - + {{ 'core.settings.' + state | translate }} - - + + - {{'core.settings.locked' | translate }} - {{ 'core.settings.disabled' | translate }} + {{'core.settings.locked' | translate }} + {{ 'core.settings.disabled' | translate }}
diff --git a/src/addon/notifications/pages/settings/settings.ts b/src/addon/notifications/pages/settings/settings.ts index e4ca15b6f..254fa8108 100644 --- a/src/addon/notifications/pages/settings/settings.ts +++ b/src/addon/notifications/pages/settings/settings.ts @@ -96,7 +96,7 @@ export class AddonNotificationsSettingsPage implements OnDestroy { return Promise.reject('No processor found'); } - preferences.disableall = !!preferences.disableall; // Convert to boolean. + preferences.enableall = !preferences.disableall; this.preferences = preferences; this.loadProcessor(this.currentProcessor); @@ -230,17 +230,17 @@ export class AddonNotificationsSettingsPage implements OnDestroy { } /** - * Disable all notifications changed. + * Enable all notifications changed. */ - disableAll(disable: boolean): void { + enableAll(enable: boolean): void { const modal = this.domUtils.showModalLoading('core.sending', true); - this.userProvider.updateUserPreferences([], disable).then(() => { + this.userProvider.updateUserPreferences([], !enable).then(() => { // Update the preferences since they were modified. this.updatePreferencesAfterDelay(); }).catch((message) => { // Show error and revert change. this.domUtils.showErrorModal(message); - this.preferences.disableall = !this.preferences.disableall; + this.preferences.enableall = !this.preferences.enableall; }).finally(() => { modal.dismiss(); });