Delay loading the content file until after all the handlers are configured.
This commit is contained in:
parent
702c174fb0
commit
933c853395
6
main.js
6
main.js
|
@ -36,9 +36,6 @@ function createWindow () {
|
||||||
app.mainWindow = mainWindow = new BrowserWindow(mainWindowOptions)
|
app.mainWindow = mainWindow = new BrowserWindow(mainWindowOptions)
|
||||||
mainWindow.maximize();
|
mainWindow.maximize();
|
||||||
|
|
||||||
// and load the index.html of the app.
|
|
||||||
mainWindow.loadFile('index.html')
|
|
||||||
|
|
||||||
// Init tray
|
// Init tray
|
||||||
trayService.initTray(mainWindow)
|
trayService.initTray(mainWindow)
|
||||||
|
|
||||||
|
@ -95,6 +92,9 @@ function createWindow () {
|
||||||
ipcMain.handle('trayService', (e, method, ...args) => {
|
ipcMain.handle('trayService', (e, method, ...args) => {
|
||||||
return trayService[method].apply(trayService, 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
|
// This method will be called when Electron has finished
|
||||||
|
|
Loading…
Reference in New Issue