Merge pull request #5309 from RinkiyaKeDad/fix-final-10

Renamed TagPanel and TagOrderStore
This commit is contained in:
Travis Ralston 2020-10-14 16:33:31 -06:00 committed by GitHub
commit 3edb6b2234
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 114 additions and 114 deletions

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import { RoomListStoreClass } from "./RoomListStore";
import TagOrderStore from "../TagOrderStore";
import GroupFilterOrderStore from "../GroupFilterOrderStore";
import { CommunityFilterCondition } from "./filters/CommunityFilterCondition";
import { arrayDiff, arrayHasDiff } from "../../utils/arrays";
@ -26,12 +26,12 @@ export class TagWatcher {
private filters = new Map<string, CommunityFilterCondition>();
constructor(private store: RoomListStoreClass) {
TagOrderStore.addListener(this.onTagsUpdated);
GroupFilterOrderStore.addListener(this.onTagsUpdated);
}
private onTagsUpdated = () => {
const lastTags = Array.from(this.filters.keys());
const newTags = TagOrderStore.getSelectedTags();
const newTags = GroupFilterOrderStore.getSelectedTags();
if (arrayHasDiff(lastTags, newTags)) {
// Selected tags changed, do some filtering