Refactor custom logic to use the shared canResetTimeline() (#10403)

Split out from https://github.com/matrix-org/matrix-react-sdk/pull/8354#discussion_r852611407
pull/28788/head^2
Eric Eastwood 2023-03-20 10:58:53 -05:00 committed by GitHub
parent 28f217b035
commit 5b2e12ca0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -773,7 +773,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
private onRoomTimelineReset = (room: Room, timelineSet: EventTimelineSet): void => {
if (timelineSet !== this.props.timelineSet) return;
if (this.messagePanel.current && this.messagePanel.current.isAtBottom()) {
if (this.canResetTimeline()) {
this.loadTimeline();
}
};