add command line arg (--hidden) for electron app

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/3641/head
Michael Telatynski 2017-04-17 22:10:56 +01:00
parent 15accf33f5
commit 44479f24dd
1 changed files with 6 additions and 3 deletions

View File

@ -201,9 +201,12 @@ electron.app.on('ready', () => {
brand: vectorConfig.brand || 'Riot' brand: vectorConfig.brand || 'Riot'
}); });
mainWindow.once('ready-to-show', () => { if (!process.argv.includes('--hidden')) {
mainWindow.show(); mainWindow.once('ready-to-show', () => {
}); mainWindow.show();
});
}
mainWindow.on('closed', () => { mainWindow.on('closed', () => {
mainWindow = null; mainWindow = null;
}); });