Skip to content

Commit

Permalink
[Glitch] Fix auto-loading-more when not scrolled
Browse files Browse the repository at this point in the history
Port 2b98e2e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
  • Loading branch information
ClearlyClaire committed Oct 8, 2023
1 parent 53f5b27 commit 967bd54
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ScrollableList extends PureComponent {
const clientHeight = this.getClientHeight();
const offset = scrollHeight - scrollTop - clientHeight;

if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
if (scrollTop > 0 && offset < 400 && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
this.props.onLoadMore();
}

Expand Down

0 comments on commit 967bd54

Please sign in to comment.