From d1503d8a65c0a985863c26c8daefa3e192c0c05c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 19 Feb 2020 14:55:49 +0000 Subject: [PATCH] fix edge case Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/stores/RoomListStore.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stores/RoomListStore.js b/src/stores/RoomListStore.js index 3c6171f272..02dd04bda9 100644 --- a/src/stores/RoomListStore.js +++ b/src/stores/RoomListStore.js @@ -474,6 +474,12 @@ class RoomListStore extends Store { _setRoomCategory(room, category) { if (!room) return; // This should only happen in tests + if (!this._state.orderImportantFirst) { + // XXX bail here early to avoid https://github.com/vector-im/riot-web/issues/9216 + // this may mean that category updates are missed whilst not ordering by importance first + return; + } + const listsClone = {}; // Micro optimization: Support lazily loading the last timestamp in a room