fix(@desktop/keycard): crash by just running "Setup a new Keycard with an existing account" flow and closing it

Fixes: #11346
This commit is contained in:
Sale Djenic 2023-06-30 11:24:08 +02:00 committed by saledjenic
parent db16c61cbe
commit 263ef86c31
2 changed files with 18 additions and 9 deletions

View File

@ -94,22 +94,27 @@ SettingsContentBase {
target: root.keycardStore.keycardModule
function onDisplayKeycardSharedModuleFlow() {
Global.openPopup(keycardPopup);
keycardPopup.active = true
}
function onDestroyKeycardSharedModuleFlow() {
Global.closePopup();
keycardPopup.active = false
}
function onSharedModuleBusy() {
Global.openPopup(sharedModuleBusyPopupComponent)
}
}
Component {
Loader {
id: keycardPopup
KeycardPopup {
active: false
sourceComponent: KeycardPopup {
sharedKeycardModule: root.keycardStore.keycardModule.keycardSharedModule
emojiPopup: root.emojiPopup
}
onLoaded: {
keycardPopup.item.open()
}
}
}
}

View File

@ -72,11 +72,11 @@ Item {
}
function onDisplayKeycardSharedModuleFlow() {
Global.openPopup(keycardPopup);
keycardPopup.active = true
}
function onDestroyKeycardSharedModuleFlow() {
Global.closePopup();
keycardPopup.active = false
}
function onMailserverWorking() {
@ -1427,12 +1427,16 @@ Item {
Global.settingsLoaded()
}
Component {
Loader {
id: keycardPopup
KeycardPopup {
anchors.centerIn: parent
active: false
sourceComponent: KeycardPopup {
sharedKeycardModule: appMain.rootStore.mainModuleInst.keycardSharedModule
}
onLoaded: {
keycardPopup.item.open()
}
}
DropAreaPanel {