From 3590c97d96d0b9a739d266067d15999924b9178c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 29 Jan 2020 15:24:06 +0100 Subject: [PATCH] unrelated fix: rerender hidden event tile when decrypted to get accurate type --- src/components/views/messages/ViewSourceEvent.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/views/messages/ViewSourceEvent.js b/src/components/views/messages/ViewSourceEvent.js index 62cf45fb6e..9064fc3b68 100644 --- a/src/components/views/messages/ViewSourceEvent.js +++ b/src/components/views/messages/ViewSourceEvent.js @@ -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;