diff --git a/TODO.md b/TODO.md index 150fffd1..19350ee5 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,4 @@ - room doesn't change category when accept/reject invite -- forget doesn't delete - "rejoin" leftbanner button if room is public - daybreak color diff --git a/src/qml/Models/RoomCategories.qml b/src/qml/Models/RoomCategories.qml index 34799f47..21f786a6 100644 --- a/src/qml/Models/RoomCategories.qml +++ b/src/qml/Models/RoomCategories.qml @@ -1,4 +1,11 @@ import QtQuick 2.7 +import SortFilterProxyModel 0.2 import "../Base" -HListModel {} +HListModel { + sorters: [ + FilterSorter { ValueFilter { roleName: "name"; value: "Invites" } }, + FilterSorter { ValueFilter { roleName: "name"; value: "Rooms" } }, + FilterSorter { ValueFilter { roleName: "name"; value: "Left" } } + ] +} diff --git a/src/qml/SidePane/RoomCategoriesList.qml b/src/qml/SidePane/RoomCategoriesList.qml index bda8af24..624db118 100644 --- a/src/qml/SidePane/RoomCategoriesList.qml +++ b/src/qml/SidePane/RoomCategoriesList.qml @@ -14,12 +14,6 @@ HListView { roleName: "userId" value: userId } - - sorters: FilterSorter { - ValueFilter { roleName: "name"; value: "Invites" } - ValueFilter { roleName: "name"; value: "Rooms" } - ValueFilter { roleName: "name"; value: "Left" } - } } delegate: RoomCategoryDelegate {}