Use IncompatibleController to disable showLocation via labs flag (#7566)
parent
a2f09480ee
commit
e1cdbe1e54
|
@ -286,10 +286,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
||||||
showStickers: false,
|
showStickers: false,
|
||||||
showStickersButton: SettingsStore.getValue("MessageComposerInput.showStickersButton"),
|
showStickersButton: SettingsStore.getValue("MessageComposerInput.showStickersButton"),
|
||||||
showPollsButton: SettingsStore.getValue("feature_polls"),
|
showPollsButton: SettingsStore.getValue("feature_polls"),
|
||||||
showLocationButton: (
|
showLocationButton: SettingsStore.getValue("MessageComposerInput.showLocationButton"),
|
||||||
SettingsStore.getValue("feature_location_share") &&
|
|
||||||
SettingsStore.getValue("MessageComposerInput.showLocationButton")
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.instanceId = instanceCount++;
|
this.instanceId = instanceCount++;
|
||||||
|
@ -354,12 +351,9 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
case "MessageComposerInput.showLocationButton":
|
case "MessageComposerInput.showLocationButton":
|
||||||
case "feature_location_share": {
|
case "feature_location_share": {
|
||||||
const showLocationButton = (
|
const showLocationButton = SettingsStore.getValue(
|
||||||
SettingsStore.getValue("feature_location_share") &&
|
"MessageComposerInput.showLocationButton");
|
||||||
SettingsStore.getValue(
|
|
||||||
"MessageComposerInput.showLocationButton",
|
|
||||||
)
|
|
||||||
);
|
|
||||||
if (this.state.showLocationButton !== showLocationButton) {
|
if (this.state.showLocationButton !== showLocationButton) {
|
||||||
this.setState({ showLocationButton });
|
this.setState({ showLocationButton });
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,7 +418,7 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
displayName: _td('Enable location sharing'),
|
displayName: _td('Enable location sharing'),
|
||||||
default: true,
|
default: true,
|
||||||
controller: new UIFeatureController(UIFeature.Widgets, false),
|
controller: new IncompatibleController("feature_location_share", false, false),
|
||||||
},
|
},
|
||||||
// TODO: Wire up appropriately to UI (FTUE notifications)
|
// TODO: Wire up appropriately to UI (FTUE notifications)
|
||||||
"Notifications.alwaysShowBadgeCounts": {
|
"Notifications.alwaysShowBadgeCounts": {
|
||||||
|
|
Loading…
Reference in New Issue