From 17cbd4512df90aa435e85de69b44a430439f13ae Mon Sep 17 00:00:00 2001 From: Boris Melnik Date: Wed, 1 Jun 2022 17:49:57 +0300 Subject: [PATCH] fix(appmain): Fix multiple creations of mailservers-not-working popup Closes: #5899 --- ui/app/mainui/AppMain.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 7d9a174b53..525c978e61 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -640,10 +640,13 @@ Item { Connections { target: rootStore.mainModuleInst onMailserverNotWorking: { - Global.openPopup(mailserverNotWorkingPopupComponent); + if (!appLayout.mailserverNotWorkingPopup) { + appLayout.mailserverNotWorkingPopup = Global.openPopup(mailserverNotWorkingPopupComponent); + } } } - } + } // ColumnLayout + property var mailserverNotWorkingPopup: null Component { id: mailserverNotWorkingPopupComponent @@ -652,6 +655,7 @@ Item { anchors.centerIn: parent header.title: qsTr("Can not connect to mailserver") onClosed: { + appLayout.mailserverNotWorkingPopup = null destroy() }