From 8bb860e870b8a6ea632e2b0669ce0dc967c003e9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 27 Jun 2019 10:37:33 -0600 Subject: [PATCH] Use fewer functions for typing in the composer --- .../views/rooms/MessageComposerInput.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 274e347c5f..6feb9e264e 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -424,18 +424,6 @@ export default class MessageComposerInput extends React.Component { } }; - onTypingActivity() { - this.sendTyping(true); - } - - onFinishedTyping() { - this.sendTyping(false); - } - - sendTyping(isTyping) { - TypingStore.sharedInstance().setSelfTyping(this.props.room.roomId, isTyping); - } - onChange = (change: Change, originalEditorState?: Value) => { let editorState = change.value; @@ -466,9 +454,9 @@ export default class MessageComposerInput extends React.Component { } if (Plain.serialize(editorState) !== '') { - this.onTypingActivity(); + TypingStore.sharedInstance().setSelfTyping(this.props.room.roomId, true); } else { - this.onFinishedTyping(); + TypingStore.sharedInstance().setSelfTyping(this.props.room.roomId, false); } if (editorState.startText !== null) {