Merge branch 'develop' into travis/room-list/enable
This commit is contained in:
commit
bdb641279a
5 changed files with 180 additions and 126 deletions
|
@ -25,7 +25,7 @@ import { IListOrderingMap, ITagMap, ITagSortingMap, ListAlgorithm, SortAlgorithm
|
|||
import { ActionPayload } from "../../dispatcher/payloads";
|
||||
import defaultDispatcher from "../../dispatcher/dispatcher";
|
||||
import { readReceiptChangeIsFor } from "../../utils/read-receipts";
|
||||
import { IFilterCondition } from "./filters/IFilterCondition";
|
||||
import { FILTER_CHANGED, IFilterCondition } from "./filters/IFilterCondition";
|
||||
import { TagWatcher } from "./TagWatcher";
|
||||
import RoomViewStore from "../RoomViewStore";
|
||||
import { Algorithm, LIST_UPDATED_EVENT } from "./algorithms/Algorithm";
|
||||
|
@ -71,6 +71,7 @@ export class RoomListStore2 extends AsyncStore<ActionPayload> {
|
|||
for (const settingName of this.watchedSettings) SettingsStore.monitorSetting(settingName, null);
|
||||
RoomViewStore.addListener(() => this.handleRVSUpdate({}));
|
||||
this.algorithm.on(LIST_UPDATED_EVENT, this.onAlgorithmListUpdated);
|
||||
this.algorithm.on(FILTER_CHANGED, this.onAlgorithmFilterUpdated);
|
||||
}
|
||||
|
||||
public get orderedLists(): ITagMap {
|
||||
|
@ -512,6 +513,11 @@ export class RoomListStore2 extends AsyncStore<ActionPayload> {
|
|||
this.updateFn.mark();
|
||||
};
|
||||
|
||||
private onAlgorithmFilterUpdated = () => {
|
||||
// The filter can happen off-cycle, so trigger an update if we need to.
|
||||
this.updateFn.triggerIfWillMark();
|
||||
};
|
||||
|
||||
/**
|
||||
* Regenerates the room whole room list, discarding any previous results.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue