From 988f0b9c57657b1aed9c078057a977e20f764d00 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 13 Apr 2021 13:49:51 -0400 Subject: [PATCH] fix: fix changing network because popup didn't open --- .../Profile/Sections/NetworkRadioSelector.qml | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml b/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml index 0806176989..84c4b80ee0 100644 --- a/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml +++ b/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml @@ -17,19 +17,25 @@ StatusRadioButtonRow { if (checked) { if (profileModel.network.current === network) return; newNetwork = network; - confirmDialog.open(); + openPopup(confirmDialogComponent) } } - ConfirmationDialog { - id: confirmDialog - //% "Warning!" - title: qsTrId("close-app-title") - //% "The account will be logged out. When you unlock it again, the selected network will be used" - confirmationText: qsTrId("logout-app-content") - onConfirmButtonClicked: { - profileModel.network.current = newNetwork; + Component { + id: confirmDialogComponent + ConfirmationDialog { + id: confirmDialog + //% "Warning!" + title: qsTrId("close-app-title") + //% "The account will be logged out. When you unlock it again, the selected network will be used" + confirmationText: qsTrId("logout-app-content") + onConfirmButtonClicked: { + profileModel.network.current = newNetwork; + } + onClosed: { + profileModel.network.triggerNetworkChange() + destroy() + } } - onClosed: profileModel.network.triggerNetworkChange() } }