about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/following
diff options
context:
space:
mode:
authorNaoki Kosaka <n.k@mail.yukimochi.net>2017-06-06 01:18:56 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-05 18:18:56 +0200
commita0880edc6e95b4fa43039e3bfbe31ea078cef2e8 (patch)
tree07554653415676967a2a6b38f3a9761c00087e73 /app/javascript/mastodon/features/following
parent61fcdbbf7e2df3ad409857af682d2699fafa1928 (diff)
Fix (PR #3585) Add hasMore to propTypes and cover handleScroll. (#3589)
Diffstat (limited to 'app/javascript/mastodon/features/following')
-rw-r--r--app/javascript/mastodon/features/following/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/following/index.js b/app/javascript/mastodon/features/following/index.js
index e7be0f084..764f702ff 100644
--- a/app/javascript/mastodon/features/following/index.js
+++ b/app/javascript/mastodon/features/following/index.js
@@ -27,6 +27,7 @@ class Following extends ImmutablePureComponent {
     params: PropTypes.object.isRequired,
     dispatch: PropTypes.func.isRequired,
     accountIds: ImmutablePropTypes.list,
+    hasMore: PropTypes.bool,
   };
 
   componentWillMount () {
@@ -44,7 +45,7 @@ class Following extends ImmutablePureComponent {
   handleScroll = (e) => {
     const { scrollTop, scrollHeight, clientHeight } = e.target;
 
-    if (scrollTop === scrollHeight - clientHeight) {
+    if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {
       this.props.dispatch(expandFollowing(Number(this.props.params.accountId)));
     }
   }