mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:35:04 +08:00
Replace labs flag with a real setting
This commit is contained in:
parent
a49b5109c6
commit
8ef4b1b2e7
@ -667,8 +667,7 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||
disabled={this.props.leftDisabled}
|
||||
/>
|
||||
);
|
||||
if (SettingsStore.isFeatureEnabled("feature_new_room_list")) {
|
||||
// TODO: Supply props like collapsed and disabled to LeftPanel2
|
||||
if (SettingsStore.getValue("feature_new_room_list")) {
|
||||
leftPanel = (
|
||||
<LeftPanel2
|
||||
isMinimized={this.props.collapseLhs || false}
|
||||
|
@ -147,7 +147,8 @@ export const SETTINGS = {
|
||||
default: false,
|
||||
},
|
||||
"feature_new_room_list": {
|
||||
isFeature: true,
|
||||
// TODO: Remove setting: https://github.com/vector-im/riot-web/issues/14367
|
||||
// XXX: We shouldn't have non-features appear like features.
|
||||
displayName: _td("Use the improved room list (will refresh to apply changes)"),
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
default: true,
|
||||
|
@ -99,7 +99,7 @@ class RoomListStore extends Store {
|
||||
}
|
||||
|
||||
_checkDisabled() {
|
||||
this.disabled = SettingsStore.isFeatureEnabled("feature_new_room_list");
|
||||
this.disabled = SettingsStore.getValue("feature_new_room_list");
|
||||
if (this.disabled) {
|
||||
console.warn("👋 legacy room list store has been disabled");
|
||||
}
|
||||
|
@ -72,9 +72,9 @@ export class RoomListStore2 extends AsyncStore<ActionPayload> {
|
||||
return this._matrixClient;
|
||||
}
|
||||
|
||||
// TODO: Remove enabled flag with the old RoomListStore: https://github.com/vector-im/riot-web/issues/14231
|
||||
// TODO: Remove enabled flag with the old RoomListStore: https://github.com/vector-im/riot-web/issues/14367
|
||||
private checkEnabled() {
|
||||
this.enabled = SettingsStore.isFeatureEnabled("feature_new_room_list");
|
||||
this.enabled = SettingsStore.getValue("feature_new_room_list");
|
||||
if (this.enabled) {
|
||||
console.log("⚡ new room list store engaged");
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ import { ITagMap } from "./algorithms/models";
|
||||
*/
|
||||
export class RoomListStoreTempProxy {
|
||||
public static isUsingNewStore(): boolean {
|
||||
return SettingsStore.isFeatureEnabled("feature_new_room_list");
|
||||
return SettingsStore.getValue("feature_new_room_list");
|
||||
}
|
||||
|
||||
public static addListener(handler: () => void): RoomListStoreTempToken {
|
||||
|
Loading…
Reference in New Issue
Block a user