From 5e7ce561b081464a92f41adf77b3b19d9758cdde Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 2 Jul 2019 14:13:45 -0400 Subject: [PATCH] Sort accounts and room categories models --- src/qml/Models.qml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/qml/Models.qml b/src/qml/Models.qml index 7fd22e4c..550d526d 100644 --- a/src/qml/Models.qml +++ b/src/qml/Models.qml @@ -3,7 +3,12 @@ import SortFilterProxyModel 0.2 import "Base" QtObject { - property HListModel accounts: HListModel {} + property HListModel accounts: HListModel { + sorters: StringSorter { + roleName: "userId" + numericMode: true // human numeric sort + } + } property HListModel users: HListModel { function getUser(as_account_id, wanted_user_id) { @@ -29,7 +34,13 @@ QtObject { property HListModel devices: HListModel {} - property HListModel roomCategories: HListModel {} + property HListModel roomCategories: HListModel { + sorters: FilterSorter { + ValueFilter { roleName: "name"; value: "Invites" } + ValueFilter { roleName: "name"; value: "Rooms" } + ValueFilter { roleName: "name"; value: "Left" } + } + } property HListModel rooms: HListModel {}