about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions
diff options
context:
space:
mode:
authorgeta6 <getakura@gmail.com>2017-04-18 20:10:49 +0900
committerEugen <eugen@zeonfederated.com>2017-04-18 13:10:49 +0200
commit75910abd8f9b40a08e8b4a79979b99ec841c6cd9 (patch)
tree97b8a26716924fd4d2af4b4282a1f253a4401908 /app/assets/javascripts/components/actions
parent93c13fe691750e8c7f0c90091bca2564b97ccba7 (diff)
Add hasMore field to account timeline (#2066)
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r--app/assets/javascripts/components/actions/accounts.jsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/actions/accounts.jsx b/app/assets/javascripts/components/actions/accounts.jsx
index 37ebb9969..eac5c78bb 100644
--- a/app/assets/javascripts/components/actions/accounts.jsx
+++ b/app/assets/javascripts/components/actions/accounts.jsx
@@ -126,7 +126,8 @@ export function expandAccountTimeline(id) {
         max_id: lastId
       }
     }).then(response => {
-      dispatch(expandAccountTimelineSuccess(id, response.data));
+      const next = getLinks(response).refs.find(link => link.rel === 'next');
+      dispatch(expandAccountTimelineSuccess(id, response.data, next));
     }).catch(error => {
       dispatch(expandAccountTimelineFail(id, error));
     });
@@ -257,11 +258,12 @@ export function expandAccountTimelineRequest(id) {
   };
 };
 
-export function expandAccountTimelineSuccess(id, statuses) {
+export function expandAccountTimelineSuccess(id, statuses, next) {
   return {
     type: ACCOUNT_TIMELINE_EXPAND_SUCCESS,
     id,
-    statuses
+    statuses,
+    next
   };
 };