From: ThibG Date: Wed, 19 Dec 2018 21:23:16 +0000 (+0100) Subject: Fix unnecessary loadMore calls when the end of a timeline has been reached (#9581) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=8389b496ba9f8b5fa04a34ccc14c8e4195e03ea3;p=mastodon.git Fix unnecessary loadMore calls when the end of a timeline has been reached (#9581) Fixes #9568 --- diff --git a/app/javascript/mastodon/components/scrollable_list.js b/app/javascript/mastodon/components/scrollable_list.js index 774c8835d..fec06e263 100644 --- a/app/javascript/mastodon/components/scrollable_list.js +++ b/app/javascript/mastodon/components/scrollable_list.js @@ -49,7 +49,7 @@ export default class ScrollableList extends PureComponent { const { scrollTop, scrollHeight, clientHeight } = this.node; 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(); }