From eeb77aeb5193bf0c9f1772bf2de7f515dc27db82 Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Thu, 21 Jul 2022 11:03:51 +0200 Subject: [PATCH] fix(@desktop/chat): sort display names in UserListPanel fixes: #6185 --- ui/app/AppLayouts/Chat/panels/UserListPanel.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml index f4dbfe9331..7ced9ebfd1 100644 --- a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml @@ -12,6 +12,8 @@ import utils 1.0 import "../controls" +import SortFilterProxyModel 0.2 + Item { id: root anchors.fill: parent @@ -50,7 +52,13 @@ Item { bottomMargin: Style.current.bigPadding } - model: usersModule.model + model: SortFilterProxyModel { + sourceModel: usersModule.model + sorters: StringSorter { + roleName: "displayName" + caseSensitivity: Qt.CaseInsensitive + } + } section.property: "onlineStatus" section.delegate: (root.width > 58) ? sectionDelegateComponent : null delegate: StatusMemberListItem {