From c7d8f3931fea112dcbac565e1ec718c758e86eaa Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 8 Nov 2017 17:06:36 -0700 Subject: [PATCH] Revert notification toolbar setting It isn't a setting. Signed-off-by: Travis Ralston --- src/Notifier.js | 8 ++++---- src/settings/Settings.js | 4 ---- src/settings/handlers/DeviceSettingsHandler.js | 5 ----- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/Notifier.js b/src/Notifier.js index 10cdf074bf..75b698862c 100644 --- a/src/Notifier.js +++ b/src/Notifier.js @@ -211,15 +211,15 @@ const Notifier = { }); // update the info to localStorage for persistent settings - if (persistent && SettingsStore.isLevelSupported(SettingLevel.DEVICE)) { - return SettingsStore.setValue("notificationToolbarHidden", null, SettingLevel.DEVICE, hidden); + if (persistent && global.localStorage) { + global.localStorage.setItem("notifications_hidden", hidden); } }, isToolbarHidden: function() { // Check localStorage for any such meta data - if (SettingsStore.isLevelSupported(SettingLevel.DEVICE)) { - return SettingsStore.getValue("notificationToolbarHidden"); + if (global.localStorage) { + return global.localStorage.getItem("notifications_hidden") === "true"; } return this.toolbarHidden; diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 3aab27bf04..b432e613d3 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -236,8 +236,4 @@ export const SETTINGS = { default: true, controller: new AudioNotificationsEnabledController(), }, - "notificationToolbarHidden": { - supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS, - default: false, - }, }; diff --git a/src/settings/handlers/DeviceSettingsHandler.js b/src/settings/handlers/DeviceSettingsHandler.js index cfac861ce4..7b5ec6a5dd 100644 --- a/src/settings/handlers/DeviceSettingsHandler.js +++ b/src/settings/handlers/DeviceSettingsHandler.js @@ -45,8 +45,6 @@ export default class DeviceSettingsHandler extends SettingsHandler { return localStorage.getItem("notifications_body_enabled") === "true"; } else if (settingName === "audioNotificationsEnabled") { return localStorage.getItem("audio_notifications_enabled") === "true"; - } else if (settingName === "notificationToolbarHidden") { - return localStorage.getItem("notifications_hidden") === "true"; } return this._getSettings()[settingName]; @@ -68,9 +66,6 @@ export default class DeviceSettingsHandler extends SettingsHandler { } else if (settingName === "audioNotificationsEnabled") { localStorage.setItem("audio_notifications_enabled", newValue); return Promise.resolve(); - } else if (settingName === "notificationToolbarHidden") { - localStorage.setItem("notifications_hidden", newValue); - return Promise.resolve(); } const settings = this._getSettings();