From 2446ce7e96b51c077165dcc708581958d9ee14e5 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 7 Nov 2023 16:09:58 -0500 Subject: [PATCH] fix(ConfirmPasswordView): only use privacyModule when in main app state --- ui/app/AppLayouts/Onboarding/stores/StartupStore.qml | 2 ++ ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/app/AppLayouts/Onboarding/stores/StartupStore.qml b/ui/app/AppLayouts/Onboarding/stores/StartupStore.qml index 97f6d3a3bc..5f216e136a 100644 --- a/ui/app/AppLayouts/Onboarding/stores/StartupStore.qml +++ b/ui/app/AppLayouts/Onboarding/stores/StartupStore.qml @@ -11,6 +11,8 @@ QtObject { property var fetchingDataModel: startupModuleInst ? startupModuleInst.fetchingDataModel : null + readonly property int appState: startupModuleInst.appState + readonly property int localPairingState: startupModuleInst ? startupModuleInst.localPairingState : -1 readonly property string localPairingError: startupModuleInst ? startupModuleInst.localPairingError : "" readonly property string localPairingName: startupModuleInst ? startupModuleInst.localPairingName : "" diff --git a/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml b/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml index 993c48fd3c..80695d9a03 100644 --- a/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml +++ b/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml @@ -1,4 +1,4 @@ -import QtQuick 2.0 +import QtQuick 2.15 import QtQuick.Controls 2.13 import QtQuick.Layouts 1.12 @@ -141,7 +141,9 @@ Item { } Connections { - target: RootStore.privacyModule + enabled: root.startupStore.appState == Constants.appState.main + // Only use the privacyModule if we are in the app, otherwise we try to use modules that don't exist yet + target: enabled ? RootStore.privacyModule : null function onPasswordChanged(success: bool, errorMsg: string) { if (success) { submitBtn.loading = false