From dabd6291a5952241423a9f592320024af643a695 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Sun, 5 Nov 2023 12:23:56 +0100 Subject: [PATCH] roomlist: Fix ListSectionDelegate usage The default property of ListSectionDelegate is already an alias to the RowLayout.data and trying to use RoomLayout.children didn't work as expected. --- src/qml/RoomListPage.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qml/RoomListPage.qml b/src/qml/RoomListPage.qml index 4481579d5..4b987d39c 100644 --- a/src/qml/RoomListPage.qml +++ b/src/qml/RoomListPage.qml @@ -197,18 +197,22 @@ Kirigami.Page { activeSpaceId: spaceDrawer.selectedSpaceId } - section.property: sortFilterRoomListModel.filterText.length === 0 && !Config.mergeRoomList ? "category" : null - section.delegate: root.collapsed ? foldButton : sectionHeader + section { + property: sortFilterRoomListModel.filterText.length === 0 && !Config.mergeRoomList ? "category" : null + delegate: root.collapsed ? foldButton : sectionHeader + } Component { id: sectionHeader Kirigami.ListSectionHeader { height: implicitHeight + width: listView.width label: roomListModel.categoryName(section) action: Kirigami.Action { onTriggered: roomListModel.setCategoryVisible(section, !roomListModel.categoryVisible(section)) } - contentItem.children: QQC2.ToolButton { + + QQC2.ToolButton { icon { name: roomListModel.categoryVisible(section) ? "go-up" : "go-down" width: Kirigami.Units.iconSizes.small