diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 089fbc13f4..353b7cc643 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -293,23 +293,14 @@ export default class MessageComposer extends React.Component { const uploadInputStyle = {display: 'none'}; const MessageComposerInput = sdk.getComponent("rooms.MessageComposerInput"); + const callInProgress = this.props.callState && this.props.callState !== 'ended'; + const controls = [ this.state.me ? : null, this.props.e2eStatus ? : null, ]; - let callButton; - let videoCallButton; - let hangupButton; - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); - // Call buttons - if (this.props.callState && this.props.callState !== 'ended') { - hangupButton = ; - } else { - callButton = ; - videoCallButton = ; - } if (!this.state.tombstone && this.state.canSendMessages) { // This also currently includes the call buttons. Really we should @@ -367,9 +358,9 @@ export default class MessageComposer extends React.Component { formattingButton, stickerpickerButton, uploadButton, - hangupButton, - callButton, - videoCallButton, + callInProgress ? : null, + callInProgress ? null : , + callInProgress ? null : , ); } else if (this.state.tombstone) { const replacementRoomId = this.state.tombstone.getContent()['replacement_room'];