From 2e9fb7615a6cbb433d994e3e95c9a6dcecba3719 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sat, 21 Nov 2020 21:47:06 +0000 Subject: [PATCH] Don't hide room when searching This makes it more easy to find the room you want without having to clicking on every collapsed sections. --- imports/NeoChat/Page/RoomListPage.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imports/NeoChat/Page/RoomListPage.qml b/imports/NeoChat/Page/RoomListPage.qml index 127376d76..b96fabda8 100644 --- a/imports/NeoChat/Page/RoomListPage.qml +++ b/imports/NeoChat/Page/RoomListPage.qml @@ -55,7 +55,7 @@ Kirigami.ScrollablePage { roomSortOrder: SortFilterRoomListModel.Categories } - section.property: "category" + section.property: sortFilterRoomListModel.filterText.length === 0 ? "category" : null section.delegate: Kirigami.ListSectionHeader { id: sectionHeader action: Kirigami.Action { @@ -80,8 +80,8 @@ Kirigami.ScrollablePage { } delegate: Kirigami.SwipeListItem { - visible: model.categoryVisible - height: model.categoryVisible ? implicitHeight : 0 + visible: model.categoryVisible || sortFilterRoomListModel.filterText.length > 0 + height: model.categoryVisible || sortFilterRoomListModel.filterText.length > 0 ? implicitHeight : 0 focus: true action: Kirigami.Action { id: enterRoomAction