mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Merge pull request #2697 from vector-im/dbkr/show_when_ready
Only show window when ready
This commit is contained in:
commit
b825862f95
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue