Move community filtering into the sublist
This is a step towards the room list not having to concern itself with the search parameters.
This commit is contained in:
parent
f9540dd7cd
commit
42498d32cc
3 changed files with 55 additions and 11 deletions
|
@ -32,6 +32,7 @@ import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
|
|||
import RoomListLayoutStore from "./RoomListLayoutStore";
|
||||
import { MarkedExecution } from "../../utils/MarkedExecution";
|
||||
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
||||
import { NameFilterCondition } from "./filters/NameFilterCondition";
|
||||
|
||||
interface IState {
|
||||
tagsEnabled?: boolean;
|
||||
|
@ -588,6 +589,20 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
|
|||
this.updateFn.trigger();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the first (and ideally only) name filter condition. If one isn't present,
|
||||
* this returns null.
|
||||
* @returns The first name filter condition, or null if none.
|
||||
*/
|
||||
public getFirstNameFilterCondition(): NameFilterCondition | null {
|
||||
for (const filter of this.filterConditions) {
|
||||
if (filter instanceof NameFilterCondition) {
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the tags for a room identified by the store. The returned set
|
||||
* should never be empty, and will contain DefaultTagID.Untagged if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue