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