Remove setting for old room list

This commit is contained in:
Travis Ralston 2020-07-17 14:02:51 -06:00
parent 618ecbd261
commit 06336a88b3
7 changed files with 21 additions and 63 deletions

View file

@ -92,19 +92,12 @@ class RoomListStore extends Store {
constructor() {
super(dis);
this._checkDisabled();
this.disabled = true;
this._init();
this._getManualComparator = this._getManualComparator.bind(this);
this._recentsComparator = this._recentsComparator.bind(this);
}
_checkDisabled() {
this.disabled = SettingsStore.getValue("feature_new_room_list");
if (this.disabled) {
console.warn("👋 legacy room list store has been disabled");
}
}
/**
* Changes the sorting algorithm used by the RoomListStore.
* @param {string} algorithm The new algorithm to use. Should be one of the ALGO_* constants.
@ -196,7 +189,6 @@ class RoomListStore extends Store {
break;
}
this._checkDisabled();
if (this.disabled) return;
// Always ensure that we set any state needed for settings here. It is possible that

View file

@ -52,7 +52,7 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
public static TEST_MODE = false;
private initialListsGenerated = false;
private enabled = false;
private enabled = true;
private algorithm = new Algorithm();
private filterConditions: IFilterCondition[] = [];
private tagWatcher = new TagWatcher(this);
@ -121,12 +121,7 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
this.updateFn.trigger();
}
// TODO: Remove enabled flag with the old RoomListStore: https://github.com/vector-im/riot-web/issues/14367
private checkEnabled() {
this.enabled = SettingsStore.getValue("feature_new_room_list");
if (this.enabled) {
console.log("⚡ new room list store engaged");
}
if (SettingsStore.getValue("advancedRoomListLogging")) {
console.warn("Advanced room list logging is enabled");
}

View file

@ -28,7 +28,7 @@ import { ITagMap } from "./algorithms/models";
*/
export class RoomListStoreTempProxy {
public static isUsingNewStore(): boolean {
return SettingsStore.getValue("feature_new_room_list");
return true;
}
public static addListener(handler: () => void): RoomListStoreTempToken {