Skip to content

Commit

Permalink
Fix public timeline page not paginating correctly (mastodon#10245)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Mar 12, 2019
1 parent 1b4c876 commit 3a3b4f9
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ class PublicTimeline extends React.PureComponent {
}
}

handleLoadMore = maxId => {
const { dispatch, local } = this.props;
dispatch(local ? expandCommunityTimeline({ maxId }) : expandPublicTimeline({ maxId }));
handleLoadMore = () => {
const { dispatch, statusIds, local } = this.props;
const maxId = statusIds.last();

if (maxId) {
dispatch(local ? expandCommunityTimeline({ maxId }) : expandPublicTimeline({ maxId }));
}
}

setRef = c => {
Expand Down

0 comments on commit 3a3b4f9

Please sign in to comment.