From 8d06b540916d4d6cdcc6e7f4f5c3f1f65d3e7ae8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 Dec 2016 09:45:31 +0000 Subject: [PATCH] Only show window when ready Avoids it sitting there for a short period with no spinner while it parses the js. --- electron/src/electron-main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/electron/src/electron-main.js b/electron/src/electron-main.js index 2ca0b9d3..57f4f66d 100644 --- a/electron/src/electron-main.js +++ b/electron/src/electron-main.js @@ -159,10 +159,14 @@ electron.app.on('ready', () => { mainWindow = new electron.BrowserWindow({ icon: `${__dirname}/../img/riot.ico`, width: 1024, height: 768, + show: false, }); mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`); electron.Menu.setApplicationMenu(VectorMenu); + mainWindow.once('ready-to-show', () => { + mainWindow.show(); + }); mainWindow.on('closed', () => { mainWindow = null; });