Disable typing notifications for threads (#7180)
This commit is contained in:
@@ -95,6 +95,7 @@ function selectionEquals(a: Partial<Selection>, 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<IProps, IState>
|
||||
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();
|
||||
|
||||
@@ -535,6 +535,7 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
|
||||
ref={this.editorRef}
|
||||
model={this.model}
|
||||
room={this.getRoom()}
|
||||
threadId={this.props.editState?.getEvent()?.getThread()?.id}
|
||||
initialCaret={this.props.editState.getCaret()}
|
||||
label={_t("Edit message")}
|
||||
onChange={this.onChange}
|
||||
|
||||
@@ -643,6 +643,9 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
||||
};
|
||||
|
||||
render() {
|
||||
const threadId = this.props.relation?.rel_type === RelationType.Thread
|
||||
? this.props.relation.event_id
|
||||
: null;
|
||||
return (
|
||||
<div className="mx_SendMessageComposer" onClick={this.focusComposer} onKeyDown={this.onKeyDown}>
|
||||
<BasicMessageComposer
|
||||
@@ -650,6 +653,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
||||
ref={this.editorRef}
|
||||
model={this.model}
|
||||
room={this.props.room}
|
||||
threadId={threadId}
|
||||
label={this.props.placeholder}
|
||||
placeholder={this.props.placeholder}
|
||||
onPaste={this.onPaste}
|
||||
|
||||
Reference in New Issue
Block a user