Hide composer buttons if we can't send events (#7719)

This commit is contained in:
Šimon Brandner 2022-02-04 10:36:31 +01:00 committed by GitHub
parent 29cf22a521
commit 2e19f81bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -428,7 +428,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
permalinkCreator={this.props.permalinkCreator} /> permalinkCreator={this.props.permalinkCreator} />
<div className="mx_MessageComposer_row"> <div className="mx_MessageComposer_row">
{ controls } { controls }
<MessageComposerButtons { this.state.canSendMessages && <MessageComposerButtons
addEmoji={this.addEmoji} addEmoji={this.addEmoji}
haveRecording={this.state.haveRecording} haveRecording={this.state.haveRecording}
isMenuOpen={this.state.isMenuOpen} isMenuOpen={this.state.isMenuOpen}
@ -446,7 +446,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
showLocationButton={!window.electron} showLocationButton={!window.electron}
showStickersButton={this.state.showStickersButton} showStickersButton={this.state.showStickersButton}
toggleButtonMenu={this.toggleButtonMenu} toggleButtonMenu={this.toggleButtonMenu}
/> /> }
{ showSendButton && ( { showSendButton && (
<SendButton <SendButton
key="controls_send" key="controls_send"