Skip to content

Commit

Permalink
Adapt Hide Location patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jdauphant committed Mar 20, 2023
1 parent c9dbbaf commit 1a0898e
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/node_modules/matrix-react-sdk/src/components/views/rooms/MessageComposer.tsx b/node_modules/matrix-react-sdk/src/components/views/rooms/MessageComposer.tsx
index 86e0256..89b1b36 100644
--- a/node_modules/matrix-react-sdk/src/components/views/rooms/MessageComposer.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/rooms/MessageComposer.tsx
@@ -60,6 +60,7 @@ import { setUpVoiceBroadcastPreRecording } from "../../../voice-broadcast/utils/
import { SdkContextClass } from "../../../contexts/SDKContext";
import { VoiceBroadcastInfoState } from "../../../voice-broadcast";
import { createCantStartVoiceMessageBroadcastDialog } from "../dialogs/CantStartVoiceMessageBroadcastDialog";
+import TchapUtils from '../../../../../../src/util/TchapUtils'; // :TCHAP:

let instanceCount = 0;

@@ -611,7 +612,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
relation={this.props.relation}
onRecordStartEndClick={this.onRecordStartEndClick}
setStickerPickerOpen={this.setStickerPickerOpen}
- showLocationButton={!window.electron}
+ showLocationButton={!window.electron && TchapUtils.isMapConfigured() } // :TCHAP: showLocationButton only if map server is configured.
showPollsButton={this.state.showPollsButton}
showStickersButton={this.showStickersButton}
isRichTextEnabled={this.state.isRichTextEnabled}

0 comments on commit 1a0898e

Please sign in to comment.