aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Danny Qiu <dqiu55@gmail.com>2020-05-01 05:36:17 -0700
committerLibravatar GitHub <noreply@github.com>2020-05-01 12:36:17 +0000
commitb71298aa50a2d8291227eecf986ef389b2aa0520 (patch)
treea2468aca803bd11991c3d66001bc77f94fab5be0 /src
parentdocs: add dannyqiu as a contributor (#698) (diff)
downloadferdium-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')
-rw-r--r--src/stores/AppStore.js5
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 {
33const mainWindow = remote.getCurrentWindow(); 33const mainWindow = remote.getCurrentWindow();
34 34
35const defaultLocale = DEFAULT_APP_SETTINGS.locale; 35const defaultLocale = DEFAULT_APP_SETTINGS.locale;
36
37const executablePath = isMac ? remote.process.execPath : process.execPath;
36const autoLauncher = new AutoLaunch({ 38const autoLauncher = new AutoLaunch({
37 name: 'Ferdi', 39 name: 'Ferdi',
40 path: executablePath,
38}); 41});
39 42
40const CATALINA_NOTIFICATION_HACK_KEY = '_temp_askedForCatalinaNotificationPermissions'; 43const 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) {