diff options
author | 2018-02-19 10:50:44 +0100 | |
---|---|---|
committer | 2018-02-19 10:50:44 +0100 | |
commit | 3426e5d43fcb5f6272670563a9d9aebee8fbbd9c (patch) | |
tree | 12b7457f39d7fdb88a46d5e93502f34f74b9b42e /src/stores/AppStore.js | |
parent | readd @2x icons (diff) | |
parent | Restore windows behavior for notifications and add linux support (diff) | |
download | ferdium-app-3426e5d43fcb5f6272670563a9d9aebee8fbbd9c.tar.gz ferdium-app-3426e5d43fcb5f6272670563a9d9aebee8fbbd9c.tar.zst ferdium-app-3426e5d43fcb5f6272670563a9d9aebee8fbbd9c.zip |
fix(Linux): Fix window restore on notification click (@closingin)
Correctly restore window when clicking on a notification
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 9b59f01d2..162422017 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -9,7 +9,7 @@ import prettyBytes from 'pretty-bytes'; | |||
9 | import Store from './lib/Store'; | 9 | import Store from './lib/Store'; |
10 | import Request from './lib/Request'; | 10 | import Request from './lib/Request'; |
11 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 11 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
12 | import { isMac } from '../environment'; | 12 | import { isMac, isLinux, isWindows } from '../environment'; |
13 | import locales from '../i18n/translations'; | 13 | import locales from '../i18n/translations'; |
14 | import { gaEvent } from '../lib/analytics'; | 14 | import { gaEvent } from '../lib/analytics'; |
15 | 15 | ||
@@ -179,9 +179,12 @@ export default class AppStore extends Store { | |||
179 | 179 | ||
180 | this.actions.service.setActive({ serviceId }); | 180 | this.actions.service.setActive({ serviceId }); |
181 | 181 | ||
182 | if (!isMac) { | 182 | const mainWindow = remote.getCurrentWindow(); |
183 | const mainWindow = remote.getCurrentWindow(); | 183 | |
184 | if (isWindows) { | ||
184 | mainWindow.restore(); | 185 | mainWindow.restore(); |
186 | } else if (isLinux) { | ||
187 | mainWindow.show(); | ||
185 | } | 188 | } |
186 | } | 189 | } |
187 | }; | 190 | }; |