From 0c1dc30e5a693587157c1f6b60037b0e4f21d82e Mon Sep 17 00:00:00 2001 From: Khushboo Mehta Date: Thu, 4 Nov 2021 15:55:48 +0100 Subject: [PATCH] fix(@desktop/onboarding): backup seed phrase flow is shown for recovered account fixes #3954 --- ui/app/AppLayouts/Profile/panels/MenuPanel.qml | 3 +-- ui/app/AppLayouts/Profile/views/PrivacyView.qml | 1 + ui/app/AppMain.qml | 11 +---------- ui/main.qml | 9 +++++++++ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml index 0a1a32827b..ed1e6d8fe2 100644 --- a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml @@ -40,8 +40,7 @@ Column { selected: Config.currentMenuTab === model.menu_id onClicked: root.menuItemClicked(model) visible: model.ifEnabled !== "browser" || root.browserMenuItemEnabled - badge.value: (!mnemonicModule.isBackedUp && (settingsMenuDelegate.title === - settingsMenuItems.itemAt(0).text)) ? 1 : 0 + badge.value: !mnemonicModule.isBackedUp && settingsMenuDelegate.title === qsTr("Privacy and security") } } diff --git a/ui/app/AppLayouts/Profile/views/PrivacyView.qml b/ui/app/AppLayouts/Profile/views/PrivacyView.qml index 04d51f4db2..bc83bf4bb7 100644 --- a/ui/app/AppLayouts/Profile/views/PrivacyView.qml +++ b/ui/app/AppLayouts/Profile/views/PrivacyView.qml @@ -50,6 +50,7 @@ Item { implicitHeight: 52 components: [ StatusBadge { + value: !root.store.mnemonicBackedUp visible: !root.store.mnemonicBackedUp anchors.verticalCenter: parent.verticalCenter }, diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 8733f60fec..8a2c5330c1 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -344,7 +344,7 @@ Item { checked: appView.currentIndex == Utils.getAppSectionIndex(Constants.profile) onClicked: appMain.changeAppSection(Constants.profile) - badge.visible: !profileModel.mnemonic.isBackedUp + badge.visible: !mnemonicModule.isBackedUp badge.anchors.rightMargin: 4 badge.anchors.topMargin: 5 badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusAppNavBar.backgroundColor @@ -593,15 +593,6 @@ Item { } } - Connections { - target: profileModel - ignoreUnknownSignals: true - enabled: removeMnemonicAfterLogin - onInitialized: { - mnemonicModule.remove() - } - } - Connections { target: profileModel.contacts onContactRequestAdded: { diff --git a/ui/main.qml b/ui/main.qml index 87eb9aa414..b9ee78a4c9 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -131,6 +131,15 @@ StatusWindow { } } + Connections { + target: profileModel + ignoreUnknownSignals: true + enabled: removeMnemonicAfterLogin + onInitialized: { + mnemonicModule.remove() + } + } + // The easiest way to get current system theme (is it light or dark) without using // OS native methods is to check lightness (0 - 1.0) of the window color. // If it's too high (0.85+) means light theme is an active.