Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5b2e12c

Browse files
Refactor custom logic to use the shared canResetTimeline() (#10403)
Split out from #8354 (comment)
1 parent 28f217b commit 5b2e12c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/structures/TimelinePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
773773
private onRoomTimelineReset = (room: Room, timelineSet: EventTimelineSet): void => {
774774
if (timelineSet !== this.props.timelineSet) return;
775775

776-
if (this.messagePanel.current && this.messagePanel.current.isAtBottom()) {
776+
if (this.canResetTimeline()) {
777777
this.loadTimeline();
778778
}
779779
};

0 commit comments

Comments
 (0)