From 3ea783b370413b4274810fe0817af072adea025f Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 21 May 2021 21:09:21 +0200 Subject: [PATCH] Prioritize "low priority" over "direct chat" in roomList categories There's no exact right or wrong here, but if a room was explicitly marked as "low priority", we should honor this tag. Fixes a slight inconsistency with the implementation in Element Fixes #357 --- src/roomlistmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/roomlistmodel.cpp b/src/roomlistmodel.cpp index daf0dec6c..856a330ff 100644 --- a/src/roomlistmodel.cpp +++ b/src/roomlistmodel.cpp @@ -346,12 +346,12 @@ QVariant RoomListModel::data(const QModelIndex &index, int role) const if (room->isFavourite()) { return RoomType::Favorite; } - if (room->isDirectChat()) { - return RoomType::Direct; - } if (room->isLowPriority()) { return RoomType::Deprioritized; } + if (room->isDirectChat()) { + return RoomType::Direct; + } return RoomType::Normal; } if (role == UnreadCountRole) {