mirror of https://github.com/vector-im/riot-web
Disable location sharing button on Desktop (#7590)
parent
8f7fa07152
commit
09a1bc66a8
|
@ -284,7 +284,10 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
||||||
isMenuOpen: false,
|
isMenuOpen: false,
|
||||||
showStickers: false,
|
showStickers: false,
|
||||||
showStickersButton: SettingsStore.getValue("MessageComposerInput.showStickersButton"),
|
showStickersButton: SettingsStore.getValue("MessageComposerInput.showStickersButton"),
|
||||||
showLocationButton: SettingsStore.getValue("MessageComposerInput.showLocationButton"),
|
showLocationButton: (
|
||||||
|
!window.electron &&
|
||||||
|
SettingsStore.getValue("MessageComposerInput.showLocationButton")
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.instanceId = instanceCount++;
|
this.instanceId = instanceCount++;
|
||||||
|
@ -340,8 +343,10 @@ 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 = SettingsStore.getValue(
|
const showLocationButton = (
|
||||||
"MessageComposerInput.showLocationButton");
|
!window.electron &&
|
||||||
|
SettingsStore.getValue("MessageComposerInput.showLocationButton")
|
||||||
|
);
|
||||||
|
|
||||||
if (this.state.showLocationButton !== showLocationButton) {
|
if (this.state.showLocationButton !== showLocationButton) {
|
||||||
this.setState({ showLocationButton });
|
this.setState({ showLocationButton });
|
||||||
|
|
|
@ -307,7 +307,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
||||||
getShowLocationIfEnabled(): string[] {
|
getShowLocationIfEnabled(): string[] {
|
||||||
// TODO: when location sharing is out of labs, this can be deleted and
|
// TODO: when location sharing is out of labs, this can be deleted and
|
||||||
// we can just add this to COMPOSER_SETTINGS
|
// we can just add this to COMPOSER_SETTINGS
|
||||||
if (SettingsStore.getValue("feature_location_share")) {
|
if (!window.electron && SettingsStore.getValue("feature_location_share")) {
|
||||||
return ['MessageComposerInput.showLocationButton'];
|
return ['MessageComposerInput.showLocationButton'];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
|
|
Loading…
Reference in New Issue