From e5a25656e8ba0c8d69d83c46187de18ef2f7b1b1 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 23 Dec 2018 11:40:52 +0100 Subject: [PATCH] [Glitch] Fix unnecessary loadMore calls when the end of a timeline has been reached Port 240d41b3ca482e9575473d55f81cabc4c7e74da8 to glitch flavour --- app/javascript/flavours/glitch/components/scrollable_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js index bd922462e9..21d717b816 100644 --- a/app/javascript/flavours/glitch/components/scrollable_list.js +++ b/app/javascript/flavours/glitch/components/scrollable_list.js @@ -47,7 +47,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(); }