diff options
author | Danny Qiu <dqiu55@gmail.com> | 2020-05-01 05:36:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 12:36:17 +0000 |
commit | b71298aa50a2d8291227eecf986ef389b2aa0520 (patch) | |
tree | a2468aca803bd11991c3d66001bc77f94fab5be0 /src/stores | |
parent | docs: add dannyqiu as a contributor (#698) (diff) | |
download | ferdium-app-b71298aa50a2d8291227eecf986ef389b2aa0520.tar.gz ferdium-app-b71298aa50a2d8291227eecf986ef389b2aa0520.tar.zst ferdium-app-b71298aa50a2d8291227eecf986ef389b2aa0520.zip |
Review launch on startup for macOS, start Ferdi app, not renderer (#696)
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 96142787e..153fdb2c8 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -33,8 +33,11 @@ const { | |||
33 | const mainWindow = remote.getCurrentWindow(); | 33 | const mainWindow = remote.getCurrentWindow(); |
34 | 34 | ||
35 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; | 35 | const defaultLocale = DEFAULT_APP_SETTINGS.locale; |
36 | |||
37 | const executablePath = isMac ? remote.process.execPath : process.execPath; | ||
36 | const autoLauncher = new AutoLaunch({ | 38 | const autoLauncher = new AutoLaunch({ |
37 | name: 'Ferdi', | 39 | name: 'Ferdi', |
40 | path: executablePath, | ||
38 | }); | 41 | }); |
39 | 42 | ||
40 | const CATALINA_NOTIFICATION_HACK_KEY = '_temp_askedForCatalinaNotificationPermissions'; | 43 | const CATALINA_NOTIFICATION_HACK_KEY = '_temp_askedForCatalinaNotificationPermissions'; |
@@ -324,8 +327,10 @@ export default class AppStore extends Store { | |||
324 | 327 | ||
325 | try { | 328 | try { |
326 | if (enable) { | 329 | if (enable) { |
330 | debug('enabling launch on startup', executablePath); | ||
327 | autoLauncher.enable(); | 331 | autoLauncher.enable(); |
328 | } else { | 332 | } else { |
333 | debug('disabling launch on startup'); | ||
329 | autoLauncher.disable(); | 334 | autoLauncher.disable(); |
330 | } | 335 | } |
331 | } catch (err) { | 336 | } catch (err) { |