Refactor custom logic to use the shared canResetTimeline() (#10403)
Split out from https://github.com/matrix-org/matrix-react-sdk/pull/8354#discussion_r852611407pull/28788/head^2
parent
28f217b035
commit
5b2e12ca0c
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue