You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Function name
This commit is contained in:
@@ -335,7 +335,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||||||
// The Relations model from the JS SDK for reactions to `mxEvent`
|
// The Relations model from the JS SDK for reactions to `mxEvent`
|
||||||
reactions: this.getReactions(),
|
reactions: this.getReactions(),
|
||||||
|
|
||||||
mxEvent: this.mxEvent.getSnapshotCopy(), // snapshot up front to verify it all works
|
mxEvent: this.mxEvent.toSnapshot(), // snapshot up front to verify it all works
|
||||||
|
|
||||||
hover: false,
|
hover: false,
|
||||||
};
|
};
|
||||||
@@ -497,7 +497,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||||||
// a second state update to re-render child components, which ultimately calls didUpdate
|
// a second state update to re-render child components, which ultimately calls didUpdate
|
||||||
// again, so we break that loop with a reference check first (faster than comparing events).
|
// again, so we break that loop with a reference check first (faster than comparing events).
|
||||||
if (this.state.mxEvent === prevState.mxEvent && !this.state?.mxEvent.isEquivalentTo(this.props.mxEvent)) {
|
if (this.state.mxEvent === prevState.mxEvent && !this.state?.mxEvent.isEquivalentTo(this.props.mxEvent)) {
|
||||||
this.setState({mxEvent: this.props.mxEvent.getSnapshotCopy()});
|
this.setState({mxEvent: this.props.mxEvent.toSnapshot()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user