Skip to content

Commit

Permalink
Refactor custom logic to use the shared canResetTimeline() (#10403)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods authored and toomore committed Apr 6, 2023
1 parent a5e471f commit db8d300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/structures/TimelinePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};
Expand Down

0 comments on commit db8d300

Please sign in to comment.