fix edge case

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-02-19 14:55:49 +00:00
parent a6edc34e97
commit d1503d8a65

View file

@ -474,6 +474,12 @@ class RoomListStore extends Store {
_setRoomCategory(room, category) { _setRoomCategory(room, category) {
if (!room) return; // This should only happen in tests 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 = {}; const listsClone = {};
// Micro optimization: Support lazily loading the last timestamp in a room // Micro optimization: Support lazily loading the last timestamp in a room