From 5fd5d0d9ea767bdb9e3070e0f496ce3a1424cc8f Mon Sep 17 00:00:00 2001 From: Black Hat Date: Sat, 18 May 2019 16:27:10 +0800 Subject: [PATCH] Sort room list based on notification count and highlight count. --- imports/Spectral/Panel/RoomListPanel.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/imports/Spectral/Panel/RoomListPanel.qml b/imports/Spectral/Panel/RoomListPanel.qml index 00cf0b1..a6125e7 100644 --- a/imports/Spectral/Panel/RoomListPanel.qml +++ b/imports/Spectral/Panel/RoomListPanel.qml @@ -54,6 +54,16 @@ Item { sorters: [ RoleSorter { roleName: "category" }, + ExpressionSorter { + expression: { + return modelLeft.highlightCount > 0; + } + }, + ExpressionSorter { + expression: { + return modelLeft.notificationCount > 0; + } + }, RoleSorter { roleName: "lastActiveTime" sortOrder: Qt.DescendingOrder