Merge pull request #5309 from RinkiyaKeDad/fix-final-10
Renamed TagPanel and TagOrderStore
This commit is contained in:
commit
3edb6b2234
26 changed files with 114 additions and 114 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue