SDA-3652 App mispositioning bugfix (#1392)

This commit is contained in:
Salah Benmoussati 2022-04-19 10:17:16 +02:00 committed by GitHub
parent f6d66b36cc
commit 882da2a42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,6 +215,7 @@ export class WindowHandler {
minHeight: 300,
minWidth: 300,
title: 'Symphony',
show: false,
},
{
preload: path.join(__dirname, '../renderer/_preload-main.js'),
@ -375,15 +376,6 @@ export class WindowHandler {
true,
);
if (isMaximized || isMaximizedFlag) {
this.mainWindow.maximize();
logger.info(
`window-handler: window is maximized!`,
isMaximized,
isMaximizedFlag,
);
}
if (isFullScreen) {
logger.info(`window-handler: window is in full screen!`);
this.mainWindow.setFullScreen(true);
@ -407,6 +399,16 @@ export class WindowHandler {
this.mainWindow.loadURL(this.url, { userAgent });
this.mainWebContents = this.mainWindow.webContents;
}
if (isMaximized || isMaximizedFlag) {
this.mainWindow.maximize();
logger.info(
`window-handler: window is maximized!`,
isMaximized,
isMaximizedFlag,
);
mainEvents.publish('maximize');
}
this.mainWindow.show();
// check for build expiry in case of test builds
this.checkExpiry(this.mainWindow);