You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
@@ -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) => {
|
onEventReplaced = (ev) => {
|
||||||
if (this.unmounted) return;
|
if (this.unmounted) return;
|
||||||
|
|
||||||
// If one of the events we are rendering gets redacted, force a re-render
|
// If one of the events we are rendering gets replaced, force a re-render
|
||||||
if (this.state.events.some(event => event.getId() === ev.getId())) {
|
this.updateForEventId(ev.getId());
|
||||||
this.forceUpdate();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onRoomRedaction = (ev) => {
|
onRoomRedaction = (ev) => {
|
||||||
@@ -251,9 +255,7 @@ export default class ReplyThread extends React.Component {
|
|||||||
if (!eventId) return;
|
if (!eventId) return;
|
||||||
|
|
||||||
// If one of the events we are rendering gets redacted, force a re-render
|
// If one of the events we are rendering gets redacted, force a re-render
|
||||||
if (this.state.events.some(event => event.getId() === eventId)) {
|
this.updateForEventId(eventId);
|
||||||
this.forceUpdate();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async initialize() {
|
async initialize() {
|
||||||
|
|||||||
Reference in New Issue
Block a user