onIsEmptyChanged() -> onChange()

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-02-17 13:25:53 +01:00
parent 9420cc35cc
commit a7847f2514
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
2 changed files with 6 additions and 7 deletions

View file

@ -415,9 +415,10 @@ export default class MessageComposer extends React.Component {
this.messageComposerInput._sendMessage();
}
onIsEmptyChanged = (isEmpty) => {
onChange = () => {
if (!this.messageComposerInput) return;
this.setState({
isComposerEmpty: isEmpty,
isComposerEmpty: this.messageComposerInput.model.isEmpty,
});
}
@ -446,7 +447,7 @@ export default class MessageComposer extends React.Component {
resizeNotifier={this.props.resizeNotifier}
permalinkCreator={this.props.permalinkCreator}
replyToEvent={this.props.replyToEvent}
onIsEmptyChanged={this.onIsEmptyChanged}
onChange={this.onChange}
/>,
<UploadButton key="controls_upload" roomId={this.props.room.roomId} />,
<EmojiButton key="emoji_button" addEmoji={this.addEmoji} />,