mirror of https://github.com/vector-im/riot-web
Merge pull request #5021 from matrix-org/t3chguy/room-list/14631
Tag Watcher don't create new filter if not needed, confuses referencespull/21833/head
commit
4de1645ac7
|
@ -54,7 +54,11 @@ export class TagWatcher {
|
|||
continue;
|
||||
}
|
||||
|
||||
newFilters.set(tag, new CommunityFilterCondition(group));
|
||||
let filter = this.filters.get(tag);
|
||||
if (!filter) {
|
||||
filter = new CommunityFilterCondition(group);
|
||||
}
|
||||
newFilters.set(tag, filter);
|
||||
}
|
||||
|
||||
// Update the room list store's filters
|
||||
|
@ -73,10 +77,6 @@ export class TagWatcher {
|
|||
if (!filter) continue;
|
||||
|
||||
this.store.removeFilter(filter);
|
||||
}
|
||||
|
||||
// Destroy any and all old filter conditions to prevent resource leaks
|
||||
for (const filter of this.filters.values()) {
|
||||
filter.destroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue