Do not show window if launched as hidden

This commit is contained in:
Josh Perez 2021-12-06 12:19:47 -05:00 committed by GitHub
parent 86937a1734
commit 69edaeabfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -699,7 +699,10 @@ async function createWindow() {
return; return;
} }
if (!startInTray) { const shouldShowWindow =
!app.getLoginItemSettings().wasOpenedAsHidden && !startInTray;
if (shouldShowWindow) {
getLogger().info('showing main window'); getLogger().info('showing main window');
mainWindow.show(); mainWindow.show();
} }