fix(warnings): Remove warnings on login screen

Fixes: #8293
This commit is contained in:
Boris Melnik 2022-12-09 13:17:40 +03:00
parent 50427390dd
commit a584a31818
3 changed files with 8 additions and 7 deletions

View File

@ -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 = ""
}

View File

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

View File

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