Don't send typing notification when restoring composer draft (#7477)
parent
fed53a268b
commit
9fd933a0b6
|
@ -234,7 +234,8 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
|
||||||
});
|
});
|
||||||
this.historyManager.tryPush(this.props.model, selection, inputType, diff);
|
this.historyManager.tryPush(this.props.model, selection, inputType, diff);
|
||||||
|
|
||||||
let isTyping = !this.props.model.isEmpty;
|
// inputType is falsy during initial mount, don't consider re-loading the draft as typing
|
||||||
|
let isTyping = !this.props.model.isEmpty && !!inputType;
|
||||||
// If the user is entering a command, only consider them typing if it is one which sends a message into the room
|
// If the user is entering a command, only consider them typing if it is one which sends a message into the room
|
||||||
if (isTyping && this.props.model.parts[0].type === "command") {
|
if (isTyping && this.props.model.parts[0].type === "command") {
|
||||||
const { cmd } = parseCommandString(this.props.model.parts[0].text);
|
const { cmd } = parseCommandString(this.props.model.parts[0].text);
|
||||||
|
|
Loading…
Reference in New Issue