fix(app): fix minimising the app on close for Windows and Linux

Fixes #4128
This commit is contained in:
Jonathan Rainville 2021-11-17 15:27:19 -05:00
parent 14f75692c4
commit 1b08e21691
1 changed files with 15 additions and 2 deletions

View File

@ -96,8 +96,21 @@ StatusWindow {
Connections {
target: applicationWindow
onClosing: {
if (Qt.platform.os === "osx") {
loader.sourceComponent = undefined
close.accepted = true
} else {
if (loader.sourceComponent == login) {
Qt.quit();
}
else if (loader.sourceComponent == app) {
if (localAccountSensitiveSettings.quitOnClose) {
Qt.quit();
} else {
applicationWindow.visible = false;
}
}
}
}
onActiveChanged: {