From d662dccfba12cabc29c09b908907c1fd3f95ccc4 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 21 Feb 2019 09:17:35 -0700 Subject: [PATCH] Fix favourites losing rooms and sorting weirdly By not flagging the room as inserted, we end up sorting it. Fixes https://github.com/vector-im/riot-web/issues/8857 --- src/stores/RoomListStore.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stores/RoomListStore.js b/src/stores/RoomListStore.js index 47480aef85..9bf1f90da5 100644 --- a/src/stores/RoomListStore.js +++ b/src/stores/RoomListStore.js @@ -287,6 +287,7 @@ class RoomListStore extends Store { // Speed optimization: Skip the loop below if we're not going to do anything productive if (!hasRoom || LIST_ORDERS[key] !== 'recent') { listsClone[key] = this._state.lists[key]; + inserted = true; // Ensure that we don't try and sort the room into the tag continue; } else { listsClone[key] = [];