Fix sentMessageAndIsAlone by dispatching `message_sent` more consistently

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-05-24 13:08:29 +01:00
parent 37d04d6ceb
commit 5e00481639
4 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import React from 'react';
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import EmojiPicker from "./EmojiPicker"; import EmojiPicker from "./EmojiPicker";
import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {MatrixClientPeg} from "../../../MatrixClientPeg";
import dis from "../../../dispatcher/dispatcher";
class ReactionPicker extends React.Component { class ReactionPicker extends React.Component {
static propTypes = { static propTypes = {
@ -105,6 +106,7 @@ class ReactionPicker extends React.Component {
"key": reaction, "key": reaction,
}, },
}); });
dis.dispatch({action: "message_sent"});
return true; return true;
} }
} }

View File

@ -22,6 +22,7 @@ import {MatrixClientPeg} from '../../../MatrixClientPeg';
import * as sdk from '../../../index'; import * as sdk from '../../../index';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; import { formatCommaSeparatedList } from '../../../utils/FormattingUtils';
import dis from "../../../dispatcher/dispatcher";
export default class ReactionsRowButton extends React.PureComponent { export default class ReactionsRowButton extends React.PureComponent {
static propTypes = { static propTypes = {
@ -60,6 +61,7 @@ export default class ReactionsRowButton extends React.PureComponent {
"key": content, "key": content,
}, },
}); });
dis.dispatch({action: "message_sent"});
} }
}; };

View File

@ -190,6 +190,7 @@ export default class EditMessageComposer extends React.Component {
const roomId = editedEvent.getRoomId(); const roomId = editedEvent.getRoomId();
this._cancelPreviousPendingEdit(); this._cancelPreviousPendingEdit();
this.context.sendMessage(roomId, editContent); this.context.sendMessage(roomId, editContent);
dis.dispatch({action: "message_sent"});
} }
// close the event editing and focus composer // close the event editing and focus composer

View File

@ -312,6 +312,7 @@ export default class SendMessageComposer extends React.Component {
event: null, event: null,
}); });
} }
dis.dispatch({action: "message_sent"});
} }
this.sendHistoryManager.save(this.model); this.sendHistoryManager.save(this.model);