Partially restore immutable event objects at the rendering layer

This is primarily to fix some extremely rare edge cases in local echo, but also restores the accuracy of some comments in the stack regarding immutable event objects (which were made mutable many years ago).

This shouldn't have any impact on the daily usage of the app, only adding a measured 0ms of latency to the stack.
This commit is contained in:
Travis Ralston 2021-06-07 20:19:16 -06:00
parent 416563d919
commit ea46df0d48
2 changed files with 76 additions and 49 deletions

View file

@ -262,6 +262,7 @@ export default class TextualBody extends React.Component {
// exploit that events are immutable :)
return (nextProps.mxEvent.getId() !== this.props.mxEvent.getId() ||
nextProps.mxEvent !== this.props.mxEvent ||
nextProps.highlights !== this.props.highlights ||
nextProps.replacingEventId !== this.props.replacingEventId ||
nextProps.highlightLink !== this.props.highlightLink ||