Delay loading the content file until after all the handlers are configured.

This commit is contained in:
Keith Maika 2022-03-14 18:40:14 -04:00
parent 702c174fb0
commit 933c853395
No known key found for this signature in database
GPG Key ID: F71740E8722C75F1
1 changed files with 3 additions and 3 deletions

View File

@ -36,9 +36,6 @@ function createWindow () {
app.mainWindow = mainWindow = new BrowserWindow(mainWindowOptions)
mainWindow.maximize();
// and load the index.html of the app.
mainWindow.loadFile('index.html')
// Init tray
trayService.initTray(mainWindow)
@ -95,6 +92,9 @@ function createWindow () {
ipcMain.handle('trayService', (e, method, ...args) => {
return trayService[method].apply(trayService, args);
});
// and load the index.html of the app.
mainWindow.loadFile('index.html')
}
// This method will be called when Electron has finished