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 (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()
}
}