From df032b04e0fad53f44d858330175c139bf13bd5f Mon Sep 17 00:00:00 2001 From: Germain Date: Tue, 23 Nov 2021 08:25:58 +0000 Subject: [PATCH] Disable typing notifications for threads (#7180) --- src/components/views/rooms/BasicMessageComposer.tsx | 7 ++++++- src/components/views/rooms/EditMessageComposer.tsx | 1 + src/components/views/rooms/SendMessageComposer.tsx | 4 ++++ src/stores/TypingStore.ts | 11 +++++++---- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index f7621a6798..d703d62aa0 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -95,6 +95,7 @@ function selectionEquals(a: Partial, b: Selection): boolean { interface IProps { model: EditorModel; room: Room; + threadId: string; placeholder?: string; label?: string; initialCaret?: DocumentOffset; @@ -243,7 +244,11 @@ export default class BasicMessageEditor extends React.Component isTyping = false; } } - TypingStore.sharedInstance().setSelfTyping(this.props.room.roomId, isTyping); + TypingStore.sharedInstance().setSelfTyping( + this.props.room.roomId, + this.props.threadId, + isTyping, + ); if (this.props.onChange) { this.props.onChange(); diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index 03851138f0..51df3fbebb 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -535,6 +535,7 @@ class EditMessageComposer extends React.Component { - this.setSelfTyping(roomId, false); + this.setSelfTyping(roomId, threadId, false); }); } else currentTyping.userTimer.restart(); }