Add setting for enabling location sharing (#7547)
This commit is contained in:
parent
ae2cb63a0d
commit
18c82d57ae
4 changed files with 34 additions and 5 deletions
|
@ -296,6 +296,16 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
|||
});
|
||||
}
|
||||
|
||||
getShowLocationIfEnabled(): string[] {
|
||||
// TODO: when location sharing is out of labs, this can be deleted and
|
||||
// we can just add this to COMPOSER_SETTINGS
|
||||
if (SettingsStore.getValue("feature_location_share")) {
|
||||
return ['MessageComposerInput.showLocationButton'];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
let autoLaunchOption = null;
|
||||
if (this.state.autoLaunchSupported) {
|
||||
|
@ -377,7 +387,10 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
|||
|
||||
<div className="mx_SettingsTab_section">
|
||||
<span className="mx_SettingsTab_subheading">{ _t("Composer") }</span>
|
||||
{ this.renderGroup(PreferencesUserSettingsTab.COMPOSER_SETTINGS) }
|
||||
{ this.renderGroup([
|
||||
...PreferencesUserSettingsTab.COMPOSER_SETTINGS,
|
||||
...this.getShowLocationIfEnabled(),
|
||||
]) }
|
||||
</div>
|
||||
|
||||
<div className="mx_SettingsTab_section">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue