Remove setting for old room list
This commit is contained in:
parent
618ecbd261
commit
06336a88b3
7 changed files with 21 additions and 63 deletions
|
@ -607,7 +607,6 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const LeftPanel = sdk.getComponent('structures.LeftPanel');
|
|
||||||
const RoomView = sdk.getComponent('structures.RoomView');
|
const RoomView = sdk.getComponent('structures.RoomView');
|
||||||
const UserView = sdk.getComponent('structures.UserView');
|
const UserView = sdk.getComponent('structures.UserView');
|
||||||
const GroupView = sdk.getComponent('structures.GroupView');
|
const GroupView = sdk.getComponent('structures.GroupView');
|
||||||
|
@ -661,21 +660,12 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||||
bodyClasses += ' mx_MatrixChat_useCompactLayout';
|
bodyClasses += ' mx_MatrixChat_useCompactLayout';
|
||||||
}
|
}
|
||||||
|
|
||||||
let leftPanel = (
|
const leftPanel = (
|
||||||
<LeftPanel
|
<LeftPanel2
|
||||||
|
isMinimized={this.props.collapseLhs || false}
|
||||||
resizeNotifier={this.props.resizeNotifier}
|
resizeNotifier={this.props.resizeNotifier}
|
||||||
collapsed={this.props.collapseLhs || false}
|
|
||||||
disabled={this.props.leftDisabled}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
if (SettingsStore.getValue("feature_new_room_list")) {
|
|
||||||
leftPanel = (
|
|
||||||
<LeftPanel2
|
|
||||||
isMinimized={this.props.collapseLhs || false}
|
|
||||||
resizeNotifier={this.props.resizeNotifier}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MatrixClientContext.Provider value={this._matrixClient}>
|
<MatrixClientContext.Provider value={this._matrixClient}>
|
||||||
|
|
|
@ -37,7 +37,6 @@ interface IProps {
|
||||||
interface IState {
|
interface IState {
|
||||||
roomId: string;
|
roomId: string;
|
||||||
activeCall: any;
|
activeCall: any;
|
||||||
newRoomListActive: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class CallPreview extends React.Component<IProps, IState> {
|
export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
|
@ -51,12 +50,7 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
this.state = {
|
this.state = {
|
||||||
roomId: RoomViewStore.getRoomId(),
|
roomId: RoomViewStore.getRoomId(),
|
||||||
activeCall: CallHandler.getAnyActiveCall(),
|
activeCall: CallHandler.getAnyActiveCall(),
|
||||||
newRoomListActive: SettingsStore.getValue("feature_new_room_list"),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.settingsWatcherRef = SettingsStore.watchSetting("feature_new_room_list", null, (name, roomId, level, valAtLevel, newVal) => this.setState({
|
|
||||||
newRoomListActive: newVal,
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentDidMount() {
|
public componentDidMount() {
|
||||||
|
@ -102,28 +96,24 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
};
|
};
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
if (this.state.newRoomListActive) {
|
const callForRoom = CallHandler.getCallForRoom(this.state.roomId);
|
||||||
const callForRoom = CallHandler.getCallForRoom(this.state.roomId);
|
const showCall = (
|
||||||
const showCall = (
|
this.state.activeCall &&
|
||||||
this.state.activeCall &&
|
this.state.activeCall.call_state === 'connected' &&
|
||||||
this.state.activeCall.call_state === 'connected' &&
|
!callForRoom
|
||||||
!callForRoom
|
);
|
||||||
|
|
||||||
|
if (showCall) {
|
||||||
|
return (
|
||||||
|
<CallView
|
||||||
|
className="mx_CallPreview" onClick={this.onCallViewClick}
|
||||||
|
ConferenceHandler={this.props.ConferenceHandler}
|
||||||
|
showHangup={true}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (showCall) {
|
|
||||||
return (
|
|
||||||
<CallView
|
|
||||||
className="mx_CallPreview" onClick={this.onCallViewClick}
|
|
||||||
ConferenceHandler={this.props.ConferenceHandler}
|
|
||||||
showHangup={true}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return <PersistentApp />;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return <PersistentApp />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -488,7 +488,6 @@
|
||||||
"Render simple counters in room header": "Render simple counters in room header",
|
"Render simple counters in room header": "Render simple counters in room header",
|
||||||
"Multiple integration managers": "Multiple integration managers",
|
"Multiple integration managers": "Multiple integration managers",
|
||||||
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
|
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
|
||||||
"Use the improved room list (will refresh to apply changes)": "Use the improved room list (will refresh to apply changes)",
|
|
||||||
"Support adding custom themes": "Support adding custom themes",
|
"Support adding custom themes": "Support adding custom themes",
|
||||||
"Enable advanced debugging for the room list": "Enable advanced debugging for the room list",
|
"Enable advanced debugging for the room list": "Enable advanced debugging for the room list",
|
||||||
"Show info about bridges in room settings": "Show info about bridges in room settings",
|
"Show info about bridges in room settings": "Show info about bridges in room settings",
|
||||||
|
|
|
@ -140,14 +140,6 @@ export const SETTINGS = {
|
||||||
supportedLevels: LEVELS_FEATURE,
|
supportedLevels: LEVELS_FEATURE,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
"feature_new_room_list": {
|
|
||||||
// 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,
|
|
||||||
controller: new ReloadOnChangeController(),
|
|
||||||
},
|
|
||||||
"feature_custom_themes": {
|
"feature_custom_themes": {
|
||||||
isFeature: true,
|
isFeature: true,
|
||||||
displayName: _td("Support adding custom themes"),
|
displayName: _td("Support adding custom themes"),
|
||||||
|
|
|
@ -92,19 +92,12 @@ class RoomListStore extends Store {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(dis);
|
super(dis);
|
||||||
|
|
||||||
this._checkDisabled();
|
this.disabled = true;
|
||||||
this._init();
|
this._init();
|
||||||
this._getManualComparator = this._getManualComparator.bind(this);
|
this._getManualComparator = this._getManualComparator.bind(this);
|
||||||
this._recentsComparator = this._recentsComparator.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.
|
* Changes the sorting algorithm used by the RoomListStore.
|
||||||
* @param {string} algorithm The new algorithm to use. Should be one of the ALGO_* constants.
|
* @param {string} algorithm The new algorithm to use. Should be one of the ALGO_* constants.
|
||||||
|
@ -196,7 +189,6 @@ class RoomListStore extends Store {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._checkDisabled();
|
|
||||||
if (this.disabled) return;
|
if (this.disabled) return;
|
||||||
|
|
||||||
// Always ensure that we set any state needed for settings here. It is possible that
|
// Always ensure that we set any state needed for settings here. It is possible that
|
||||||
|
|
|
@ -52,7 +52,7 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
|
||||||
public static TEST_MODE = false;
|
public static TEST_MODE = false;
|
||||||
|
|
||||||
private initialListsGenerated = false;
|
private initialListsGenerated = false;
|
||||||
private enabled = false;
|
private enabled = true;
|
||||||
private algorithm = new Algorithm();
|
private algorithm = new Algorithm();
|
||||||
private filterConditions: IFilterCondition[] = [];
|
private filterConditions: IFilterCondition[] = [];
|
||||||
private tagWatcher = new TagWatcher(this);
|
private tagWatcher = new TagWatcher(this);
|
||||||
|
@ -121,12 +121,7 @@ export class RoomListStore2 extends AsyncStoreWithClient<ActionPayload> {
|
||||||
this.updateFn.trigger();
|
this.updateFn.trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove enabled flag with the old RoomListStore: https://github.com/vector-im/riot-web/issues/14367
|
|
||||||
private checkEnabled() {
|
private checkEnabled() {
|
||||||
this.enabled = SettingsStore.getValue("feature_new_room_list");
|
|
||||||
if (this.enabled) {
|
|
||||||
console.log("⚡ new room list store engaged");
|
|
||||||
}
|
|
||||||
if (SettingsStore.getValue("advancedRoomListLogging")) {
|
if (SettingsStore.getValue("advancedRoomListLogging")) {
|
||||||
console.warn("Advanced room list logging is enabled");
|
console.warn("Advanced room list logging is enabled");
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ import { ITagMap } from "./algorithms/models";
|
||||||
*/
|
*/
|
||||||
export class RoomListStoreTempProxy {
|
export class RoomListStoreTempProxy {
|
||||||
public static isUsingNewStore(): boolean {
|
public static isUsingNewStore(): boolean {
|
||||||
return SettingsStore.getValue("feature_new_room_list");
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static addListener(handler: () => void): RoomListStoreTempToken {
|
public static addListener(handler: () => void): RoomListStoreTempToken {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue