fix(@desktop/settings): Tab content jump fix

This commit is contained in:
mprakhov 2022-12-01 18:03:42 +02:00 committed by Mykhailo Prakhov
parent 5c7dc4c330
commit 0c66b9fc2d
1 changed files with 5 additions and 2 deletions

View File

@ -111,6 +111,7 @@ SettingsContentBase {
anchors.right: parent.right anchors.right: parent.right
anchors.top: contactsTabBar.bottom anchors.top: contactsTabBar.bottom
currentIndex: contactsTabBar.currentIndex currentIndex: contactsTabBar.currentIndex
anchors.topMargin: Style.current.padding
// CONTACTS // CONTACTS
ColumnLayout { ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
@ -127,7 +128,7 @@ SettingsContentBase {
id: verifiedContacts id: verifiedContacts
Layout.fillWidth: true Layout.fillWidth: true
title: qsTr("Identity Verified Contacts") title: qsTr("Identity Verified Contacts")
visible: !noFriendsItem.visible visible: !noFriendsItem.visible && count > 0
contactsModel: root.contactsStore.myContactsModel contactsModel: root.contactsStore.myContactsModel
searchString: searchBox.text searchString: searchBox.text
onOpenContactContextMenu: function (publicKey, name, icon) { onOpenContactContextMenu: function (publicKey, name, icon) {
@ -143,7 +144,7 @@ SettingsContentBase {
ContactsListPanel { ContactsListPanel {
id: mutualContacts id: mutualContacts
Layout.fillWidth: true Layout.fillWidth: true
visible: !noFriendsItem.visible visible: !noFriendsItem.visible && count > 0
title: qsTr("Contacts") title: qsTr("Contacts")
contactsModel: root.contactsStore.myContactsModel contactsModel: root.contactsStore.myContactsModel
searchString: searchBox.text searchString: searchBox.text
@ -188,6 +189,7 @@ SettingsContentBase {
title: qsTr("Received") title: qsTr("Received")
searchString: searchBox.text searchString: searchBox.text
contactsStore: root.contactsStore contactsStore: root.contactsStore
visible: count > 0
onOpenContactContextMenu: function (publicKey, name, icon) { onOpenContactContextMenu: function (publicKey, name, icon) {
root.openContextMenu(publicKey, name, icon) root.openContextMenu(publicKey, name, icon)
} }
@ -218,6 +220,7 @@ SettingsContentBase {
title: qsTr("Sent") title: qsTr("Sent")
searchString: searchBox.text searchString: searchBox.text
contactsStore: root.contactsStore contactsStore: root.contactsStore
visible: count > 0
onOpenContactContextMenu: function (publicKey, name, icon) { onOpenContactContextMenu: function (publicKey, name, icon) {
root.openContextMenu(publicKey, name, icon) root.openContextMenu(publicKey, name, icon)
} }