fix: fix changing network because popup didn't open

This commit is contained in:
Jonathan Rainville 2021-04-13 13:49:51 -04:00 committed by Iuri Matias
parent 1983fa79aa
commit 988f0b9c57
1 changed files with 16 additions and 10 deletions

View File

@ -17,19 +17,25 @@ StatusRadioButtonRow {
if (checked) { if (checked) {
if (profileModel.network.current === network) return; if (profileModel.network.current === network) return;
newNetwork = network; newNetwork = network;
confirmDialog.open(); openPopup(confirmDialogComponent)
} }
} }
ConfirmationDialog { Component {
id: confirmDialog id: confirmDialogComponent
//% "Warning!" ConfirmationDialog {
title: qsTrId("close-app-title") id: confirmDialog
//% "The account will be logged out. When you unlock it again, the selected network will be used" //% "Warning!"
confirmationText: qsTrId("logout-app-content") title: qsTrId("close-app-title")
onConfirmButtonClicked: { //% "The account will be logged out. When you unlock it again, the selected network will be used"
profileModel.network.current = newNetwork; confirmationText: qsTrId("logout-app-content")
onConfirmButtonClicked: {
profileModel.network.current = newNetwork;
}
onClosed: {
profileModel.network.triggerNetworkChange()
destroy()
}
} }
onClosed: profileModel.network.triggerNetworkChange()
} }
} }