diff options
author | 2019-03-19 11:46:30 +0100 | |
---|---|---|
committer | 2019-03-19 11:46:30 +0100 | |
commit | ab9ae1829e51e463d644ff369ebc3434f2f42c81 (patch) | |
tree | 639b4dc0c0d519fbd2bf99c869b00bce1ccfb5cf /src/stores | |
parent | merge-in webview unmounting fix (diff) | |
parent | Merge pull request #1338 from meetfranz/chore/app-feature-helpers (diff) | |
download | ferdium-app-ab9ae1829e51e463d644ff369ebc3434f2f42c81.tar.gz ferdium-app-ab9ae1829e51e463d644ff369ebc3434f2f42c81.tar.zst ferdium-app-ab9ae1829e51e463d644ff369ebc3434f2f42c81.zip |
fix conflicts with latest develop
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 7784ff1f9..351ad6422 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -12,7 +12,7 @@ import { URL } from 'url'; | |||
12 | import Store from './lib/Store'; | 12 | import Store from './lib/Store'; |
13 | import Request from './lib/Request'; | 13 | import Request from './lib/Request'; |
14 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 14 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
15 | import { isMac, isLinux, isWindows } from '../environment'; | 15 | import { isMac } from '../environment'; |
16 | import locales from '../i18n/translations'; | 16 | import locales from '../i18n/translations'; |
17 | import { gaEvent, gaPage } from '../lib/analytics'; | 17 | import { gaEvent, gaPage } from '../lib/analytics'; |
18 | import { onVisibilityChange } from '../helpers/visibility-helper'; | 18 | import { onVisibilityChange } from '../helpers/visibility-helper'; |
@@ -185,7 +185,15 @@ export default class AppStore extends Store { | |||
185 | }) { | 185 | }) { |
186 | if (this.stores.settings.all.app.isAppMuted) return; | 186 | if (this.stores.settings.all.app.isAppMuted) return; |
187 | 187 | ||
188 | // TODO: is there a simple way to use blobs for notifications without storing them on disk? | ||
189 | if (options.icon.startsWith('blob:')) { | ||
190 | delete options.icon; | ||
191 | } | ||
192 | |||
188 | const notification = new window.Notification(title, options); | 193 | const notification = new window.Notification(title, options); |
194 | |||
195 | debug('New notification', title, options); | ||
196 | |||
189 | notification.onclick = (e) => { | 197 | notification.onclick = (e) => { |
190 | if (serviceId) { | 198 | if (serviceId) { |
191 | this.actions.service.sendIPCMessage({ | 199 | this.actions.service.sendIPCMessage({ |
@@ -195,12 +203,13 @@ export default class AppStore extends Store { | |||
195 | }); | 203 | }); |
196 | 204 | ||
197 | this.actions.service.setActive({ serviceId }); | 205 | this.actions.service.setActive({ serviceId }); |
198 | 206 | mainWindow.show(); | |
199 | if (isWindows) { | 207 | if (app.mainWindow.isMinimized()) { |
200 | mainWindow.restore(); | 208 | mainWindow.restore(); |
201 | } else if (isLinux) { | ||
202 | mainWindow.show(); | ||
203 | } | 209 | } |
210 | mainWindow.focus(); | ||
211 | |||
212 | debug('Notification click handler'); | ||
204 | } | 213 | } |
205 | }; | 214 | }; |
206 | } | 215 | } |