fix(@desktop/chat): click on "Notification settings" doesn't take the user to that section

Click on "Notification settings" in activity center takes user to profile tab, but not to the
notification section there, but to the last selected section. That is fixed now. Also marking
selected section within profile section is fixed now.

Fixes: #3049
This commit is contained in:
Sale Djenic 2021-07-29 10:32:40 +02:00 committed by Iuri Matias
parent 6b6ed734f6
commit 496d3c8441
1 changed files with 7 additions and 13 deletions

View File

@ -10,7 +10,7 @@ ScrollView {
readonly property int btnheight: 42 readonly property int btnheight: 42
readonly property int w: 340 readonly property int w: 340
property var changeProfileSection: function (sectionId) { property var changeProfileSection: function (sectionId) {
profileCurrentIndex = sectionId Config.currentMenuTab = sectionId
} }
contentHeight: menuItems.height + 24 contentHeight: menuItems.height + 24
@ -27,11 +27,11 @@ ScrollView {
menuItemId: modelData.id menuItemId: modelData.id
text: modelData .text text: modelData .text
source: "../../../img/profile/" + modelData.filename source: "../../../img/profile/" + modelData.filename
active: profileMenu.profileCurrentIndex === modelData.id active: Config.currentMenuTab === modelData.id
Layout.fillWidth: true Layout.fillWidth: true
width: profileMenu.width width: profileMenu.width
onClicked: { onClicked: {
Config.currentMenuTab = modelData.id; Config.currentMenuTab = modelData.id
} }
} }
} }
@ -49,12 +49,12 @@ ScrollView {
menuItemId: modelData.id menuItemId: modelData.id
text: modelData .text text: modelData .text
source: "../../../img/profile/" + modelData.filename source: "../../../img/profile/" + modelData.filename
active: profileMenu.profileCurrentIndex === modelData.id active: Config.currentMenuTab === modelData.id
visible: modelData.ifEnabled !== "browser" || appSettings.isBrowserEnabled visible: modelData.ifEnabled !== "browser" || appSettings.isBrowserEnabled
Layout.fillWidth: true Layout.fillWidth: true
width: profileMenu.width width: profileMenu.width
onClicked: function () { onClicked: function () {
Config.currentMenuTab = modelData.id; Config.currentMenuTab = modelData.id
} }
} }
} }
@ -69,22 +69,16 @@ ScrollView {
menuItemId: modelData.id menuItemId: modelData.id
text: modelData.text text: modelData.text
source: "../../../img/profile/" + modelData.filename source: "../../../img/profile/" + modelData.filename
active: profileMenu.profileCurrentIndex === modelData.id active: Config.currentMenuTab === modelData.id
Layout.fillWidth: true Layout.fillWidth: true
width: profileMenu.width width: profileMenu.width
onClicked: function () { onClicked: function () {
if (modelData.function === "exit") { if (modelData.function === "exit") {
return Qt.quit() return Qt.quit()
} }
Config.currentMenuTab = modelData.id; Config.currentMenuTab = modelData.id
} }
} }
} }
} }
} }
/*##^##
Designer {
D{i:0;formeditorColor:"#ffffff";height:500;width:340}
}
##^##*/