fix(onboarding): fix black screen when closing re-encrypt modal

Fixes #2657
This commit is contained in:
Jonathan Rainville 2021-07-07 13:44:59 -04:00 committed by Iuri Matias
parent 0368c0beaa
commit b99300bf10
3 changed files with 7 additions and 4 deletions

View File

@ -22,6 +22,7 @@ StatusWindow {
property bool removeMnemonicAfterLogin: false property bool removeMnemonicAfterLogin: false
property alias dragAndDrop: dragTarget property alias dragAndDrop: dragTarget
property bool popupOpened: false property bool popupOpened: false
property bool displayBeforeGetStartedModal: !hasAccounts
Universal.theme: Universal.System Universal.theme: Universal.System
@ -348,7 +349,6 @@ StatusWindow {
Component { Component {
id: keysMain id: keysMain
KeysMain { KeysMain {
displayBeforeGetStartedModal: !hasAccounts
btnGenKey.onClicked: applicationWindow.navigateTo("GenKey") btnGenKey.onClicked: applicationWindow.navigateTo("GenKey")
btnExistingKey.onClicked: applicationWindow.navigateTo("ExistingKey") btnExistingKey.onClicked: applicationWindow.navigateTo("ExistingKey")
} }

View File

@ -29,13 +29,15 @@ Item {
} }
MnemonicRecoverySuccessModal { MnemonicRecoverySuccessModal {
property bool wentNext: false
id: recoverySuccessModal id: recoverySuccessModal
onButtonClicked: { onButtonClicked: {
recoverySuccessModal.wentNext = true
recoverySuccessModal.close() recoverySuccessModal.close()
createPasswordModal.open() createPasswordModal.open()
} }
onClosed: function () { onClosed: function () {
if (!enterSeedPhraseModal.wentNext) { if (!recoverySuccessModal.wentNext) {
existingKeyView.onClosed() existingKeyView.onClosed()
} }
} }

View File

@ -9,15 +9,16 @@ Page {
id: page id: page
property alias btnExistingKey: btnExistingKey property alias btnExistingKey: btnExistingKey
property alias btnGenKey: btnGenKey property alias btnGenKey: btnGenKey
property bool displayBeforeGetStartedModal: true
background: Rectangle { background: Rectangle {
color: Style.current.background color: Style.current.background
} }
Component.onCompleted: { Component.onCompleted: {
if(displayBeforeGetStartedModal) if(displayBeforeGetStartedModal) {
displayBeforeGetStartedModal = false
beforeGetStartedModal.open() beforeGetStartedModal.open()
}
} }
BeforeGetStartedModal { BeforeGetStartedModal {