Refactor custom logic to use the shared canResetTimeline() (#10403)
Split out from https://github.com/matrix-org/matrix-react-sdk/pull/8354#discussion_r852611407
This commit is contained in:
parent
28f217b035
commit
5b2e12ca0c
1 changed files with 1 additions and 1 deletions
|
@ -773,7 +773,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||||
private onRoomTimelineReset = (room: Room, timelineSet: EventTimelineSet): void => {
|
private onRoomTimelineReset = (room: Room, timelineSet: EventTimelineSet): void => {
|
||||||
if (timelineSet !== this.props.timelineSet) return;
|
if (timelineSet !== this.props.timelineSet) return;
|
||||||
|
|
||||||
if (this.messagePanel.current && this.messagePanel.current.isAtBottom()) {
|
if (this.canResetTimeline()) {
|
||||||
this.loadTimeline();
|
this.loadTimeline();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue