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.
This commit is contained in:
Joshua Goins
2026-02-14 14:18:08 -05:00
parent 431dbf6457
commit 78beb9ffff

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)