unrelated fix: rerender hidden event tile when decrypted

to get accurate type
pull/21833/head
Bruno Windels 2020-01-29 15:24:06 +01:00
parent 59dc3cfb97
commit 3590c97d96
1 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,13 @@ export default class ViewSourceEvent extends React.PureComponent {
};
}
componentDidMount() {
const {mxEvent} = this.props;
if (mxEvent.isBeingDecrypted()) {
mxEvent.once("Event.decrypted", () => this.forceUpdate());
}
}
onToggle = (ev) => {
ev.preventDefault();
const { expanded } = this.state;