You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-08 17:48:33 +03:00
Remove async call to get virtual room from room load (#9743)
* remove async call to get virtual room from room load * dont init timeline twice when overlay and focused event both change * strict error * prettier
This commit is contained in:
@@ -342,12 +342,16 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
const differentEventId = prevProps.eventId != this.props.eventId;
|
||||
const differentHighlightedEventId = prevProps.highlightedEventId != this.props.highlightedEventId;
|
||||
const differentAvoidJump = prevProps.eventScrollIntoView && !this.props.eventScrollIntoView;
|
||||
const differentOverlayTimeline = prevProps.overlayTimelineSet !== this.props.overlayTimelineSet;
|
||||
if (differentEventId || differentHighlightedEventId || differentAvoidJump) {
|
||||
logger.log(
|
||||
`TimelinePanel switching to eventId ${this.props.eventId} (was ${prevProps.eventId}), ` +
|
||||
`scrollIntoView: ${this.props.eventScrollIntoView} (was ${prevProps.eventScrollIntoView})`,
|
||||
);
|
||||
this.initTimeline(this.props);
|
||||
} else if (differentOverlayTimeline) {
|
||||
logger.log(`TimelinePanel updating overlay timeline.`);
|
||||
this.initTimeline(this.props);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user