Enable location sharing (#7703)
This commit is contained in:
parent
afbc843157
commit
70a44a8cd6
6 changed files with 6 additions and 59 deletions
|
@ -87,7 +87,6 @@ interface IState {
|
|||
isMenuOpen: boolean;
|
||||
isStickerPickerOpen: boolean;
|
||||
showStickersButton: boolean;
|
||||
showLocationButton: boolean;
|
||||
}
|
||||
|
||||
@replaceableComponent("views.rooms.MessageComposer")
|
||||
|
@ -118,17 +117,11 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
|||
isMenuOpen: false,
|
||||
isStickerPickerOpen: false,
|
||||
showStickersButton: SettingsStore.getValue("MessageComposerInput.showStickersButton"),
|
||||
showLocationButton: (
|
||||
!window.electron &&
|
||||
SettingsStore.getValue("MessageComposerInput.showLocationButton")
|
||||
),
|
||||
};
|
||||
|
||||
this.instanceId = instanceCount++;
|
||||
|
||||
SettingsStore.monitorSetting("MessageComposerInput.showStickersButton", null);
|
||||
SettingsStore.monitorSetting("MessageComposerInput.showLocationButton", null);
|
||||
SettingsStore.monitorSetting("feature_location_share", null);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -174,19 +167,6 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "MessageComposerInput.showLocationButton":
|
||||
case "feature_location_share": {
|
||||
const showLocationButton = (
|
||||
!window.electron &&
|
||||
SettingsStore.getValue("MessageComposerInput.showLocationButton")
|
||||
);
|
||||
|
||||
if (this.state.showLocationButton !== showLocationButton) {
|
||||
this.setState({ showLocationButton });
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -463,7 +443,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
|||
}
|
||||
}}
|
||||
setStickerPickerOpen={this.setStickerPickerOpen}
|
||||
showLocationButton={this.state.showLocationButton}
|
||||
showLocationButton={!window.electron}
|
||||
showStickersButton={this.state.showStickersButton}
|
||||
toggleButtonMenu={this.toggleButtonMenu}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue