This repository was archived by the owner on Apr 22, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,15 +107,10 @@ function createWindow () {
107107
108108 // Check if user has defined a custom User-Agent
109109 if ( config . get ( 'user_agent' ) . length > 0 ) mainWindow . webContents . setUserAgent ( config . get ( 'user_agent' ) ) ;
110-
111- if ( ! config . get ( 'start_minimized' ) && config . get ( 'maximized' ) ) mainWindow . maximize ( ) ;
112- if ( config . get ( 'window_display_behavior' ) !== 'show_trayIcon' && config . get ( 'start_minimized' ) ) {
113- // Wait for the mainWindow.loadURL(..) and the optional mainWindow.webContents.openDevTools()
114- // to be finished before minimizing
115- mainWindow . webContents . once ( 'did-finish-load' , function ( e ) {
116- mainWindow . minimize ( ) ;
117- } ) ;
118- }
110+
111+ // Wait for the mainWindow.loadURL(..) and the optional mainWindow.webContents.openDevTools()
112+ // to be finished before minimizing
113+ config . get ( 'start_minimized' ) && mainWindow . webContents . once ( 'did-finish-load' , ( ) => config . get ( 'window_display_behavior' ) === 'show_trayIcon' ? mainWindow . hide ( ) : mainWindow . minimize ( ) ) ;
119114
120115 // Check if the window its outside of the view (ex: multi monitor setup)
121116 const { positionOnScreen } = require ( './utils/positionOnScreen' ) ;
You can’t perform that action at this time.
0 commit comments