You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-19 05:22:13 +03:00
Merge pull request #3084 from matrix-org/jryans/update-action-bar-on-decrypt
Recheck message actions on decrypt
This commit is contained in:
@@ -36,6 +36,20 @@ export default class MessageActionBar extends React.PureComponent {
|
|||||||
onFocusChange: PropTypes.func,
|
onFocusChange: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.props.mxEvent.removeListener("Event.decrypted", this.onDecrypted);
|
||||||
|
}
|
||||||
|
|
||||||
|
onDecrypted = () => {
|
||||||
|
// When an event decrypts, it is likely to change the set of available
|
||||||
|
// actions, so we force an update to check again.
|
||||||
|
this.forceUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
onFocusChange = (focused) => {
|
onFocusChange = (focused) => {
|
||||||
if (!this.props.onFocusChange) {
|
if (!this.props.onFocusChange) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user