aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/stores/AppStore.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 4a00cb294..f102fc370 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -38,6 +38,8 @@ const autoLauncher = new AutoLaunch({
38 name: 'Franz', 38 name: 'Franz',
39}); 39});
40 40
41const CATALINA_NOTIFICATION_HACK_KEY = '_temp_askedForCatalinaNotificationPermissions';
42
41export default class AppStore extends Store { 43export default class AppStore extends Store {
42 updateStatusTypes = { 44 updateStatusTypes = {
43 CHECKING: 'CHECKING', 45 CHECKING: 'CHECKING',
@@ -205,6 +207,18 @@ export default class AppStore extends Store {
205 } 207 }
206 }); 208 });
207 209
210 // macOS catalina notifications hack
211 // notifications got stuck after upgrade but forcing a notification
212 // via `new Notification` triggered the permission request
213 if (isMac && !localStorage.getItem(CATALINA_NOTIFICATION_HACK_KEY)) {
214 // eslint-disable-next-line no-new
215 new window.Notification('Welcome to Franz 5', {
216 body: 'Have a wonderful day & happy messaging.',
217 });
218
219 localStorage.setItem(CATALINA_NOTIFICATION_HACK_KEY, true);
220 }
221
208 statsEvent('app-start'); 222 statsEvent('app-start');
209 } 223 }
210 224