Skip forceUpdate in ReplyThread if the redacted event is not relevant
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a44d61fb75
commit
6f529852cd
1 changed files with 4 additions and 3 deletions
|
@ -198,9 +198,10 @@ export default class ReplyThread extends React.Component {
|
||||||
onRoomRedaction = (ev, room) => {
|
onRoomRedaction = (ev, room) => {
|
||||||
if (this.unmounted) return;
|
if (this.unmounted) return;
|
||||||
|
|
||||||
// we could skip an update if the event isn't in our timeline,
|
// If one of the events we are rendering gets redacted, force a re-render
|
||||||
// but that's probably an early optimisation.
|
if (this.state.events.some(event => event.getId() === ev.getId())) {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
async initialize() {
|
async initialize() {
|
||||||
|
|
Loading…
Reference in a new issue