aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 6cc547d33..46230abd6 100644
--- a/src/index.js
+++ b/src/index.js
@@ -39,7 +39,6 @@ import handleDeepLink from './electron/deepLinking';
39import { isPositionValid } from './electron/windowUtils'; 39import { isPositionValid } from './electron/windowUtils';
40import { appId } from './package.json'; // eslint-disable-line import/no-unresolved 40import { appId } from './package.json'; // eslint-disable-line import/no-unresolved
41import './electron/exception'; 41import './electron/exception';
42import './sentry';
43 42
44import { 43import {
45 DEFAULT_APP_SETTINGS, 44 DEFAULT_APP_SETTINGS,
@@ -80,6 +79,11 @@ if (isWindows) {
80const settings = new Settings('app', DEFAULT_APP_SETTINGS); 79const settings = new Settings('app', DEFAULT_APP_SETTINGS);
81const proxySettings = new Settings('proxy'); 80const proxySettings = new Settings('proxy');
82 81
82if (settings.get('sentry')) {
83 // eslint-disable-next-line global-require
84 require('./sentry');
85}
86
83// add `liftSingleInstanceLock` to settings.json to override the single instance lock 87// add `liftSingleInstanceLock` to settings.json to override the single instance lock
84const liftSingleInstanceLock = settings.get('liftSingleInstanceLock') || false; 88const liftSingleInstanceLock = settings.get('liftSingleInstanceLock') || false;
85 89
@@ -142,6 +146,8 @@ const createWindow = () => {
142 const mainWindowState = windowStateKeeper({ 146 const mainWindowState = windowStateKeeper({
143 defaultWidth: DEFAULT_WINDOW_OPTIONS.width, 147 defaultWidth: DEFAULT_WINDOW_OPTIONS.width,
144 defaultHeight: DEFAULT_WINDOW_OPTIONS.height, 148 defaultHeight: DEFAULT_WINDOW_OPTIONS.height,
149 maximize: false,
150 fullScreen: false,
145 }); 151 });
146 152
147 let posX = mainWindowState.x || DEFAULT_WINDOW_OPTIONS.x; 153 let posX = mainWindowState.x || DEFAULT_WINDOW_OPTIONS.x;
@@ -168,6 +174,7 @@ const createWindow = () => {
168 height: mainWindowState.height, 174 height: mainWindowState.height,
169 minWidth: 600, 175 minWidth: 600,
170 minHeight: 500, 176 minHeight: 500,
177 show: false,
171 titleBarStyle: isMac ? 'hidden' : '', 178 titleBarStyle: isMac ? 'hidden' : '',
172 frame: isLinux, 179 frame: isLinux,
173 backgroundColor, 180 backgroundColor,
@@ -300,6 +307,10 @@ const createWindow = () => {
300 shell.openExternal(url); 307 shell.openExternal(url);
301 } 308 }
302 }); 309 });
310
311 if (!(settings.get('enableSystemTray') && settings.get('startMinimized'))) {
312 mainWindow.show();
313 }
303}; 314};
304 315
305// Allow passing command line parameters/switches to electron 316// Allow passing command line parameters/switches to electron