Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7ee5f7b

Browse files
committed
Add feature flag
1 parent d994375 commit 7ee5f7b

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/components/views/dialogs/RoomSettingsDialog.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import BridgeSettingsTab from "../settings/tabs/room/BridgeSettingsTab";
2828
import sdk from "../../../index";
2929
import MatrixClientPeg from "../../../MatrixClientPeg";
3030
import dis from "../../../dispatcher";
31+
import SettingsStore from "../settings/SettingsStore";
3132

3233
export default class RoomSettingsDialog extends React.Component {
3334
static propTypes = {
@@ -53,7 +54,8 @@ export default class RoomSettingsDialog extends React.Component {
5354

5455
_getTabs() {
5556
const tabs = [];
56-
const shouldShowBridgeIcon = BridgeSettingsTab.getBridgeStateEvents(this.props.roomId).length > 0;
57+
const featureFlag = SettingsStore.isFeatureEnabled("feature_bridge_state");
58+
const shouldShowBridgeIcon = featureFlag && BridgeSettingsTab.getBridgeStateEvents(this.props.roomId).length > 0;
5759

5860
tabs.push(new Tab(
5961
_td("General"),

src/i18n/strings/en_EN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,5 +1932,6 @@
19321932
"If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.",
19331933
"Failed to set direct chat tag": "Failed to set direct chat tag",
19341934
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
1935-
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room"
1935+
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
1936+
"Show info about bridges in room settings": "Show info about bridges in room settings"
19361937
}

src/settings/Settings.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ export const SETTINGS = {
154154
displayName: _td("Enable local event indexing and E2EE search (requires restart)"),
155155
default: false,
156156
},
157+
"feature_bridge_state": {
158+
isFeature: true,
159+
supportedLevels: LEVELS_FEATURE,
160+
displayName: _td("Show info about bridges in room settings"),
161+
default: false,
162+
},
157163
"useCiderComposer": {
158164
displayName: _td("Use the new, faster, composer for writing messages"),
159165
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

0 commit comments

Comments
 (0)