Sort room list based on notification count and highlight count.

This commit is contained in:
Black Hat 2019-05-18 16:27:10 +08:00
parent b4281896ba
commit 5fd5d0d9ea
1 changed files with 10 additions and 0 deletions

View File

@ -54,6 +54,16 @@ Item {
sorters: [ sorters: [
RoleSorter { roleName: "category" }, RoleSorter { roleName: "category" },
ExpressionSorter {
expression: {
return modelLeft.highlightCount > 0;
}
},
ExpressionSorter {
expression: {
return modelLeft.notificationCount > 0;
}
},
RoleSorter { RoleSorter {
roleName: "lastActiveTime" roleName: "lastActiveTime"
sortOrder: Qt.DescendingOrder sortOrder: Qt.DescendingOrder