aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-19 11:46:30 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-19 11:46:30 +0100
commitab9ae1829e51e463d644ff369ebc3434f2f42c81 (patch)
tree639b4dc0c0d519fbd2bf99c869b00bce1ccfb5cf /src/stores
parentmerge-in webview unmounting fix (diff)
parentMerge pull request #1338 from meetfranz/chore/app-feature-helpers (diff)
downloadferdium-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.js19
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';
12import Store from './lib/Store'; 12import Store from './lib/Store';
13import Request from './lib/Request'; 13import Request from './lib/Request';
14import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; 14import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config';
15import { isMac, isLinux, isWindows } from '../environment'; 15import { isMac } from '../environment';
16import locales from '../i18n/translations'; 16import locales from '../i18n/translations';
17import { gaEvent, gaPage } from '../lib/analytics'; 17import { gaEvent, gaPage } from '../lib/analytics';
18import { onVisibilityChange } from '../helpers/visibility-helper'; 18import { 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 }