From 78beb9ffffacfaf305f0fecafbfbc58a9571b760 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 14 Feb 2026 14:18:08 -0500 Subject: [PATCH] When favoriting/reprioritizng a room, make sure to re-sort the list This fixes some odd issues like newly favorited rooms being sent to the bottom of the room list, and so on. --- src/rooms/models/roomtreemodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rooms/models/roomtreemodel.cpp b/src/rooms/models/roomtreemodel.cpp index e7a1e6551..04792648e 100644 --- a/src/rooms/models/roomtreemodel.cpp +++ b/src/rooms/models/roomtreemodel.cpp @@ -163,6 +163,9 @@ void RoomTreeModel::moveRoom(Quotient::Room *room) beginInsertRows(newParent, newParentItem->childCount(), newParentItem->childCount()); newParentItem->insertChild(std::make_unique(neochatRoom, newParentItem)); endInsertRows(); + + // The room list needs to be re-sorted when this happens, of course. + Q_EMIT invalidateSort(); } void RoomTreeModel::connectRoomSignals(NeoChatRoom *room)