Only show window when ready

Avoids it sitting there for a short period with no spinner while
it parses the js.
pull/2697/head
David Baker 2016-12-06 09:45:31 +00:00
parent 987822bd5a
commit 8d06b54091
1 changed files with 4 additions and 0 deletions

View File

@ -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;
});