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.

(cherry picked from commit 78beb9ffff)
This commit is contained in:
Joshua Goins
2026-02-14 14:18:08 -05:00
parent d8619356d3
commit 9d816158f5

View File

@@ -163,6 +163,9 @@ void RoomTreeModel::moveRoom(Quotient::Room *room)
beginInsertRows(newParent, newParentItem->childCount(), newParentItem->childCount());
newParentItem->insertChild(std::make_unique<RoomTreeItem>(neochatRoom, newParentItem));
endInsertRows();
// The room list needs to be re-sorted when this happens, of course.
Q_EMIT invalidateSort();
}
void RoomTreeModel::connectRoomSignals(NeoChatRoom *room)