Scroll to top of RoomDrawer on loading of header

(cherry picked from commit c8b4da2b96)
This commit is contained in:
Carl Schwan
2023-07-21 15:50:16 +02:00
parent 80c3253a6e
commit 94dd69ea02

View File

@@ -73,7 +73,7 @@ Kirigami.OverlayDrawer {
active: roomDrawer.drawerOpen
sourceComponent: ColumnLayout {
readonly property string userSearchText: userListView.headerItem.userListSearchField.text
readonly property string userSearchText: userListView.headerItem ? userListView.headerItem.userListSearchField.text : ''
property alias highlightedUser: userListView.currentIndex
spacing: 0
@@ -128,6 +128,9 @@ Kirigami.OverlayDrawer {
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.smallSpacing
sourceComponent: room.isDirectChat() ? directChatDrawerHeader : groupChatDrawerHeader
onItemChanged: if (item) {
userListView.positionViewAtBeginning();
}
}
Kirigami.ListSectionHeader {