From aab0c9a9e1a25f65e8ec4eb0ef6c320f7f4916ed Mon Sep 17 00:00:00 2001 From: Germain Date: Mon, 7 Aug 2023 09:14:49 +0100 Subject: [PATCH] Remove feature_right_panel_default_open (#11359) * Remove feature_right_panel_default_open * i18n --- src/i18n/strings/en_EN.json | 2 -- src/settings/Settings.tsx | 8 -------- src/stores/right-panel/RightPanelStore.ts | 17 ----------------- 3 files changed, 27 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 200e9f3d46..2b8464e092 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -983,8 +983,6 @@ "Show current profile picture and name for users in message history": "Show current profile picture and name for users in message history", "Show HTML representation of room topics": "Show HTML representation of room topics", "Show info about bridges in room settings": "Show info about bridges in room settings", - "Right panel stays open": "Right panel stays open", - "Defaults to room member list.": "Defaults to room member list.", "Jump to date (adds /jumptodate and jump to date headers)": "Jump to date (adds /jumptodate and jump to date headers)", "Requires your server to support MSC3030": "Requires your server to support MSC3030", "Send read receipts": "Send read receipts", diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index bab6c1d302..b3af440b1a 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -363,14 +363,6 @@ export const SETTINGS: { [setting: string]: ISetting } = { displayName: _td("Show info about bridges in room settings"), default: false, }, - "feature_right_panel_default_open": { - isFeature: true, - labsGroup: LabGroup.Rooms, - supportedLevels: LEVELS_FEATURE, - displayName: _td("Right panel stays open"), - description: _td("Defaults to room member list."), - default: false, - }, "feature_jump_to_date": { isFeature: true, labsGroup: LabGroup.Messaging, diff --git a/src/stores/right-panel/RightPanelStore.ts b/src/stores/right-panel/RightPanelStore.ts index 9d6d0a5a20..60e16d3bbd 100644 --- a/src/stores/right-panel/RightPanelStore.ts +++ b/src/stores/right-panel/RightPanelStore.ts @@ -377,23 +377,6 @@ export default class RightPanelStore extends ReadyWatchingStore { this.currentCard.state.initialEventScrollIntoView = undefined; } - // If the right panel stays open mode is used, and the panel was either - // closed or never shown for that room, then force it open and display - // the room member list. - if ( - SettingsStore.getValue("feature_right_panel_default_open") && - !this.byRoom[this.viewedRoomId ?? ""]?.isOpen - ) { - const history = [{ phase: RightPanelPhases.RoomMemberList }]; - const room = this.viewedRoomId ? this.mxClient?.getRoom(this.viewedRoomId) : undefined; - if (!room?.isSpaceRoom()) { - history.unshift({ phase: RightPanelPhases.RoomSummary }); - } - this.byRoom[this.viewedRoomId ?? ""] = { - isOpen: true, - history, - }; - } this.emitAndUpdateSettings(); }