fix(ConfirmPasswordView): only use privacyModule when in main app state

This commit is contained in:
Jonathan Rainville 2023-11-07 16:09:58 -05:00
parent c6d1d51bb6
commit 2446ce7e96
2 changed files with 6 additions and 2 deletions

View File

@ -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 : ""

View File

@ -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