Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-10-06 22:53:34 +01:00
parent fbcea7d2cc
commit 1bd0d9e02b
1 changed files with 9 additions and 7 deletions

View File

@ -235,13 +235,17 @@ export default class ReplyThread extends React.Component {
}
}
updateForEventId = (eventId) => {
if (this.state.events.some(event => event.getId() === eventId)) {
this.forceUpdate();
}
};
onEventReplaced = (ev) => {
if (this.unmounted) return;
// If one of the events we are rendering gets redacted, force a re-render
if (this.state.events.some(event => event.getId() === ev.getId())) {
this.forceUpdate();
}
// If one of the events we are rendering gets replaced, force a re-render
this.updateForEventId(ev.getId());
};
onRoomRedaction = (ev) => {
@ -251,9 +255,7 @@ export default class ReplyThread extends React.Component {
if (!eventId) return;
// If one of the events we are rendering gets redacted, force a re-render
if (this.state.events.some(event => event.getId() === eventId)) {
this.forceUpdate();
}
this.updateForEventId(eventId);
};
async initialize() {