From 86fe5f778d3eb413621d87ab720fbf32206855c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 17 Feb 2021 13:32:48 +0100 Subject: [PATCH] Use modal as a param MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/rooms/MessageComposer.js | 5 ++--- src/components/views/rooms/SendMessageComposer.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index d70cb5c786..819f9749e7 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -415,10 +415,9 @@ export default class MessageComposer extends React.Component { this.messageComposerInput._sendMessage(); } - onChange = () => { - if (!this.messageComposerInput) return; + onChange = (model) => { this.setState({ - isComposerEmpty: this.messageComposerInput.model.isEmpty, + isComposerEmpty: model.isEmpty, }); } diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 657d67aee2..068627455d 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -538,7 +538,7 @@ export default class SendMessageComposer extends React.Component { } onChange = () => { - if (this.props.onChange) this.props.onChange(); + if (this.props.onChange) this.props.onChange(this.model); } render() {