diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusPinInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusPinInput.qml index 7cb11c1d37..2a7e16e9cc 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusPinInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusPinInput.qml @@ -128,9 +128,13 @@ Item { */ function statesInitialization() { d.currentPinIndex = 0 - repeater.itemAt(d.currentPinIndex).innerState = "NEXT" + let item = repeater.itemAt(d.currentPinIndex) + if (item) + item.innerState = "NEXT" for (var i = 1; i < root.pinLen; i++) { - repeater.itemAt(i).innerState = "EMPTY" + let item = repeater.itemAt(i) + if (item) + item.innerState = "EMPTY" } inputText.text = "" } diff --git a/ui/imports/utils/Global.qml b/ui/imports/utils/Global.qml index 038adbf996..0f39625ac7 100644 --- a/ui/imports/utils/Global.qml +++ b/ui/imports/utils/Global.qml @@ -12,8 +12,8 @@ QtObject { property int settingsSubsection: Constants.settingsSubsection.profile property var globalUtilsInst: typeof globalUtils !== "undefined" ? globalUtils : null - property var mainModuleInst property var userProfile + property var mainModuleInst: typeof mainModule !== "undefined" ? mainModule : null property var privacyModuleInst property var toastMessage property var pinnedMessagesPopup diff --git a/ui/main.qml b/ui/main.qml index 46fc9bd1f5..6935f6eb71 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -126,7 +126,7 @@ StatusWindow { Connections { id: windowsOsNotificationsConnection - enabled: false + enabled: Qt.platform.os === Constants.windows target: Global.mainModuleInst function onDisplayWindowsOsNotification(title, message) { systemTray.showMessage(title, message) @@ -155,9 +155,6 @@ StatusWindow { // We set main module to the Global singleton once user is logged in and we move to the main app. Global.mainModuleInst = mainModule Global.userProfile = userProfile - if (Qt.platform.os === Constants.windows) { - windowsOsNotificationsConnection.enabled = true - } loader.sourceComponent = app