Scroll to top of RoomDrawer on loading of header

This commit is contained in:
Carl Schwan
2023-07-21 15:50:16 +02:00
parent ba5445e135
commit c8b4da2b96

View File

@@ -74,7 +74,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
@@ -129,6 +129,9 @@ Kirigami.OverlayDrawer {
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.smallSpacing
sourceComponent: room.isDirectChat() ? directChatDrawerHeader : groupChatDrawerHeader
onItemChanged: if (item) {
userListView.positionViewAtBeginning();
}
}
Kirigami.ListSectionHeader {