Fix jumpy room list, when sort order is ambiguous

This commit is contained in:
Nicolas Werner 2020-05-04 18:55:08 +02:00
parent a8b22e49c3
commit db24f174b1

View file

@ -384,7 +384,7 @@ RoomList::sortRoomsByLastMessage()
{
isSortPending_ = false;
std::sort(begin(rooms_sort_cache_), end(rooms_sort_cache_), room_sort{});
std::stable_sort(begin(rooms_sort_cache_), end(rooms_sort_cache_), room_sort{});
int newIndex = 0;
for (const auto &roomWidget : rooms_sort_cache_) {