From 75910abd8f9b40a08e8b4a79979b99ec841c6cd9 Mon Sep 17 00:00:00 2001
From: geta6 <getakura@gmail.com>
Date: Tue, 18 Apr 2017 20:10:49 +0900
Subject: Add hasMore field to account timeline (#2066)

---
 app/assets/javascripts/components/features/account_timeline/index.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'app/assets/javascripts/components/features/account_timeline/index.jsx')

diff --git a/app/assets/javascripts/components/features/account_timeline/index.jsx b/app/assets/javascripts/components/features/account_timeline/index.jsx
index f92e1b49c..edae976b9 100644
--- a/app/assets/javascripts/components/features/account_timeline/index.jsx
+++ b/app/assets/javascripts/components/features/account_timeline/index.jsx
@@ -46,7 +46,9 @@ const AccountTimeline = React.createClass({
   },
 
   handleScrollToBottom () {
-    this.props.dispatch(expandAccountTimeline(Number(this.props.params.accountId)));
+    if (!this.props.isLoading && this.props.hasMore) {
+      this.props.dispatch(expandAccountTimeline(Number(this.props.params.accountId)));
+    }
   },
 
   render () {
-- 
cgit 

