diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js index e717643e1..2be895b86 100644 --- a/src/browser/components/preferences/zen-settings.js +++ b/src/browser/components/preferences/zen-settings.js @@ -616,9 +616,19 @@ var gZenLooksAndFeel = { var gZenWorkspacesSettings = { init() { + var tabsUnloaderPrefListener = { + async observe(subject, topic, data) { + let buttonIndex = await confirmRestartPrompt(true, 1, true, true); + if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) { + Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); + } + } + } Services.prefs.addObserver('zen.workspaces.enabled', this); + Services.prefs.addObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener); window.addEventListener('unload', () => { Services.prefs.removeObserver('zen.workspaces.enabled', this); + Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener); }); },