diff --git a/src/app/qml/MeetingDialog.qml b/src/app/qml/MeetingDialog.qml index 085441c23..fcdaad414 100644 --- a/src/app/qml/MeetingDialog.qml +++ b/src/app/qml/MeetingDialog.qml @@ -16,7 +16,7 @@ Kirigami.PromptDialog { customFooterActions: Kirigami.Action { icon.name: "camera-video-symbolic" - text: hasExistingMeeting ? i18nc("@action:button Join the Jitsi meeting", "Join") : i18nc("@action:button Start a new Jitsi meeting", "Start") + text: root.hasExistingMeeting ? i18nc("@action:button Join the Jitsi meeting", "Join") : i18nc("@action:button Start a new Jitsi meeting", "Start") onTriggered: root.accept() } } diff --git a/src/libneochat/qml/InviteUserPage.qml b/src/libneochat/qml/InviteUserPage.qml index 0da278f3d..a21b095fd 100644 --- a/src/libneochat/qml/InviteUserPage.qml +++ b/src/libneochat/qml/InviteUserPage.qml @@ -108,7 +108,7 @@ SearchPage { id: _private function openManualUserDialog(): void { let dialog = manualUserDialog.createObject(this, { - connection: root.connection + connection: root.room.connection }) as ManualUserDialog; dialog.parent = root.Window.window.overlay; dialog.accepted.connect(() => { diff --git a/src/messagecontent/FileComponent.qml b/src/messagecontent/FileComponent.qml index 19f6da111..3e5b60668 100644 --- a/src/messagecontent/FileComponent.qml +++ b/src/messagecontent/FileComponent.qml @@ -70,7 +70,7 @@ ColumnLayout { states: [ State { name: "downloadedInstant" - when: root.fileTransferInfo.completed && autoOpenFile + when: root.fileTransferInfo.completed && root.autoOpenFile PropertyChanges { openButton.icon.name: "document-open" @@ -84,7 +84,7 @@ ColumnLayout { }, State { name: "downloaded" - when: root.fileTransferInfo.completed && !autoOpenFile + when: root.fileTransferInfo.completed && !root.autoOpenFile PropertyChanges { openButton.visible: false @@ -138,7 +138,7 @@ ColumnLayout { id: openButton icon.name: "document-open" onClicked: { - autoOpenFile = true; + root.autoOpenFile = true; root.Message.room.downloadTempFile(root.eventId); } @@ -166,7 +166,7 @@ ColumnLayout { onAccepted: { NeoChatConfig.lastSaveDirectory = currentFolder; NeoChatConfig.save(); - if (autoOpenFile) { + if (root.autoOpenFile) { UrlHelper.copyTo(root.fileTransferInfo.localPath, selectedFile); } else { root.Message.room.download(root.eventId, selectedFile); diff --git a/src/settings/NeoChatSecurityPage.qml b/src/settings/NeoChatSecurityPage.qml index b94c225d1..ee38844d0 100644 --- a/src/settings/NeoChatSecurityPage.qml +++ b/src/settings/NeoChatSecurityPage.qml @@ -57,9 +57,9 @@ FormCard.FormCardPage { FormCard.FormCheckDelegate { id: rejectInvitationsDelegate text: i18nc("@option:check", "Reject invitations from unknown users") - description: connection.canCheckMutualRooms ? i18nc("@info", "If enabled, NeoChat will reject invitations from users you don't share a room with.") : i18nc("@info", "Your server does not support this setting.") + description: root.connection.canCheckMutualRooms ? i18nc("@info", "If enabled, NeoChat will reject invitations from users you don't share a room with.") : i18nc("@info", "Your server does not support this setting.") checked: NeoChatConfig.rejectUnknownInvites - enabled: !NeoChatConfig.isRejectUnknownInvitesImmutable && connection.canCheckMutualRooms + enabled: !NeoChatConfig.isRejectUnknownInvitesImmutable && root.connection.canCheckMutualRooms onToggled: { NeoChatConfig.rejectUnknownInvites = checked; NeoChatConfig.save(); diff --git a/src/settings/NetworkProxyPage.qml b/src/settings/NetworkProxyPage.qml index a44ca4b4e..50164f2ea 100644 --- a/src/settings/NetworkProxyPage.qml +++ b/src/settings/NetworkProxyPage.qml @@ -21,10 +21,10 @@ FormCard.FormCardPage { FormCard.FormRadioDelegate { id: systemDefault text: i18n("System Default") - checked: currentType === 0 + checked: root.currentType === 0 enabled: !NeoChatConfig.isProxyTypeImmutable onToggled: { - currentType = 0 + root.currentType = 0 } } @@ -33,10 +33,10 @@ FormCard.FormCardPage { FormCard.FormRadioDelegate { id:noProxy text: i18n("No Proxy") - checked: currentType === 3 - enabled: !Config.isProxyTypeImmutable + checked: root.currentType === 3 + enabled: !NeoChatConfig.isProxyTypeImmutable onToggled: { - currentType = 3; + root.currentType = 3; } } @@ -45,10 +45,10 @@ FormCard.FormCardPage { FormCard.FormRadioDelegate { id: http text: i18n("HTTP") - checked: currentType === 1 + checked: root.currentType === 1 enabled: !NeoChatConfig.isProxyTypeImmutable onToggled: { - currentType = 1 + root.currentType = 1 } } @@ -57,10 +57,10 @@ FormCard.FormCardPage { FormCard.FormRadioDelegate { id: socks5 text: i18n("Socks5") - checked: currentType === 2 + checked: root.currentType === 2 enabled: !NeoChatConfig.isProxyTypeImmutable onToggled: { - currentType = 2 + root.currentType = 2 } } } @@ -71,7 +71,7 @@ FormCard.FormCardPage { FormCard.FormCard { // It makes no sense to configure proxy settings for "System Default" and "No Proxy" - enabled: currentType !== 0 && currentType !== 3 + enabled: root.currentType !== 0 && root.currentType !== 3 FormCard.FormTextFieldDelegate { id: hostField @@ -79,7 +79,7 @@ FormCard.FormCardPage { text: NeoChatConfig.proxyHost inputMethodHints: Qt.ImhUrlCharactersOnly onEditingFinished: { - proxyConfigChanged = true + root.proxyConfigChanged = true } } FormCard.FormDelegateSeparator { below: hostField; above: portField } @@ -101,7 +101,7 @@ FormCard.FormCardPage { return value // it will add a thousands separator if we don't do this, not sure why } onValueChanged: { - proxyConfigChanged = true + root.proxyConfigChanged = true } } } @@ -113,7 +113,7 @@ FormCard.FormCardPage { text: NeoChatConfig.proxyUser inputMethodHints: Qt.ImhUrlCharactersOnly onEditingFinished: { - proxyConfigChanged = true + root.proxyConfigChanged = true } } FormCard.FormDelegateSeparator { below: userField; above: passwordField } @@ -124,7 +124,7 @@ FormCard.FormCardPage { echoMode: TextInput.Password inputMethodHints: Qt.ImhUrlCharactersOnly onEditingFinished: { - proxyConfigChanged = true + root.proxyConfigChanged = true } } } @@ -139,15 +139,15 @@ FormCard.FormCardPage { QQC2.Button { text: i18n("Apply") icon.name: "dialog-ok-apply-symbolic" - enabled: currentType !== NeoChatConfig.proxyType || proxyConfigChanged + enabled: root.currentType !== NeoChatConfig.proxyType || root.proxyConfigChanged onClicked: { - NeoChatConfig.proxyType = currentType; + NeoChatConfig.proxyType = root.currentType; NeoChatConfig.proxyHost = hostField.text; NeoChatConfig.proxyPort = portField.value; NeoChatConfig.proxyUser = userField.text; NeoChatConfig.proxyPassword = passwordField.text; NeoChatConfig.save(); - proxyConfigChanged = false; + root.proxyConfigChanged = false; ProxyController.setApplicationProxy(); } } diff --git a/src/settings/PushNotification.qml b/src/settings/PushNotification.qml index eed70ea6a..bcfc18a01 100644 --- a/src/settings/PushNotification.qml +++ b/src/settings/PushNotification.qml @@ -30,37 +30,37 @@ FormCard.FormCardPage { FormCard.FormRadioDelegate { icon.name: "globe" text: i18nc("As in the default notification setting", "Default Settings") - checked: room.pushNotificationState === PushNotificationState.Default - enabled: room.pushNotificationState !== PushNotificationState.Unknown + checked: root.room.pushNotificationState === PushNotificationState.Default + enabled: root.room.pushNotificationState !== PushNotificationState.Unknown onToggled: { - room.pushNotificationState = PushNotificationState.Default; + root.room.pushNotificationState = PushNotificationState.Default; } } FormCard.FormRadioDelegate { icon.name: "notifications" text: i18nc("As in 'notify for all messages'", "All Messages") - checked: room.pushNotificationState === PushNotificationState.All - enabled: room.pushNotificationState !== PushNotificationState.Unknown + checked: root.room.pushNotificationState === PushNotificationState.All + enabled: root.room.pushNotificationState !== PushNotificationState.Unknown onToggled: { - room.pushNotificationState = PushNotificationState.All; + root.room.pushNotificationState = PushNotificationState.All; } } FormCard.FormRadioDelegate { icon.name: "im-user" text: i18nc("As in 'notify when the user is mentioned or the message contains a set keyword'", "@Mentions and Keywords") - checked: room.pushNotificationState === PushNotificationState.MentionKeyword - enabled: room.pushNotificationState !== PushNotificationState.Unknown + checked: root.room.pushNotificationState === PushNotificationState.MentionKeyword + enabled: root.room.pushNotificationState !== PushNotificationState.Unknown onToggled: { - room.pushNotificationState = PushNotificationState.MentionKeyword; + root.room.pushNotificationState = PushNotificationState.MentionKeyword; } } FormCard.FormRadioDelegate { icon.name: "notifications-disabled" text: i18nc("As in 'do not notify for any messages'", "None") - checked: room.pushNotificationState === PushNotificationState.Mute - enabled: room.pushNotificationState !== PushNotificationState.Unknown + checked: root.room.pushNotificationState === PushNotificationState.Mute + enabled: root.room.pushNotificationState !== PushNotificationState.Unknown onToggled: { - room.pushNotificationState = PushNotificationState.Mute; + root.room.pushNotificationState = PushNotificationState.Mute; } } } diff --git a/src/timeline/DelegateContextMenu.qml b/src/timeline/DelegateContextMenu.qml index 5009d1899..0bc342c3e 100644 --- a/src/timeline/DelegateContextMenu.qml +++ b/src/timeline/DelegateContextMenu.qml @@ -214,7 +214,7 @@ KirigamiComponents.ConvergentContextMenu { width: Kirigami.Units.gridUnit * 25 }); dialog.accepted.connect(reason => { - currentRoom.redactEvent(root.eventId, reason); + root.room.redactEvent(root.eventId, reason); }); } } @@ -340,7 +340,7 @@ KirigamiComponents.ConvergentContextMenu { width: Kirigami.Units.gridUnit * 25 }); dialog.accepted.connect(reason => { - currentRoom.reportEvent(root.eventId, reason); + root.room.reportEvent(root.eventId, reason); }); } }