Merge pull request #2681 from matrix-org/travis/unbreak-new-rooms

Fix categorization of favourites and new rooms
pull/21833/head
Bruno Windels 2019-02-22 11:34:16 +01:00 committed by GitHub
commit ec6c104e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -287,7 +287,11 @@ 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
if (LIST_ORDERS[key] !== 'recent' && (hasRoom || targetTags.includes(key))) {
// Ensure that we don't try and sort the room into the tag
inserted = true;
doInsert = false;
}
continue;
} else {
listsClone[key] = [];