From 0ae07b964ef1d8700581388c097f46f806821efa Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Wed, 7 Dec 2016 01:06:59 +0900 Subject: [PATCH] Fix "Leave app running in notification area" checkbox not working on macOS --- src/browser/components/SettingsPage.jsx | 4 +--- src/common/settings.js | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/browser/components/SettingsPage.jsx b/src/browser/components/SettingsPage.jsx index 0eaeeb2d..08f3e341 100644 --- a/src/browser/components/SettingsPage.jsx +++ b/src/browser/components/SettingsPage.jsx @@ -123,9 +123,7 @@ const SettingsPage = React.createClass({ }); }, handleChangeMinimizeToTray() { - var shouldMinimizeToTray = - (process.platform !== 'darwin' || !this.refs.showTrayIcon.props.checked) && - !this.refs.minimizeToTray.props.checked; + const shouldMinimizeToTray = this.state.showTrayIcon && !this.refs.minimizeToTray.props.checked; this.setState({ minimizeToTray: shouldMinimizeToTray diff --git a/src/common/settings.js b/src/common/settings.js index ac2abf5a..f3905889 100644 --- a/src/common/settings.js +++ b/src/common/settings.js @@ -20,6 +20,7 @@ function loadDefault(version) { showTrayIcon: false, trayIconTheme: '', disablewebsecurity: true, + minimizeToTray: false, toggleWindowOnTrayIconClick: false, version: 1, notifications: {