Browse Source

Fix unnecessary loadMore calls when the end of a timeline has been reached (#9581)

Fixes #9568
master
ThibG 5 years ago
committed by Eugen Rochko
parent
commit
8389b496ba
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/mastodon/components/scrollable_list.js

+ 1
- 1
app/javascript/mastodon/components/scrollable_list.js View File

@ -49,7 +49,7 @@ export default class ScrollableList extends PureComponent {
const { scrollTop, scrollHeight, clientHeight } = this.node; const { scrollTop, scrollHeight, clientHeight } = this.node;
const offset = scrollHeight - scrollTop - clientHeight; const offset = scrollHeight - scrollTop - clientHeight;
if (400 > offset && this.props.onLoadMore && !this.props.isLoading) {
if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
this.props.onLoadMore(); this.props.onLoadMore();
} }

Loading…
Cancel
Save