about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions/accounts.jsx
diff options
context:
space:
mode:
authorEugen <eugen@zeonfederated.com>2017-01-24 21:56:06 +0100
committerGitHub <noreply@github.com>2017-01-24 21:56:06 +0100
commitf8da0dd4907490f57cb14b052b767c66c95c4db3 (patch)
tree871a1b902872d22d0c28e96dbc733533d33ac397 /app/assets/javascripts/components/actions/accounts.jsx
parentbf0f6eb62d0f5bd1f0d8e4e2a6e9e8fd3b297b6c (diff)
parent8a880a3d464daf486a10d85b8ee49305aa6b1e5b (diff)
Merge branch 'master' into master
Diffstat (limited to 'app/assets/javascripts/components/actions/accounts.jsx')
-rw-r--r--app/assets/javascripts/components/actions/accounts.jsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/actions/accounts.jsx b/app/assets/javascripts/components/actions/accounts.jsx
index 235f29194..0be05034e 100644
--- a/app/assets/javascripts/components/actions/accounts.jsx
+++ b/app/assets/javascripts/components/actions/accounts.jsx
@@ -80,7 +80,7 @@ export function fetchAccount(id) {
 
 export function fetchAccountTimeline(id, replace = false) {
   return (dispatch, getState) => {
-    const ids      = getState().getIn(['timelines', 'accounts_timelines', id], Immutable.List());
+    const ids      = getState().getIn(['timelines', 'accounts_timelines', id, 'items'], Immutable.List());
     const newestId = ids.size > 0 ? ids.first() : null;
 
     let params = '';
@@ -103,11 +103,16 @@ export function fetchAccountTimeline(id, replace = false) {
 
 export function expandAccountTimeline(id) {
   return (dispatch, getState) => {
-    const lastId = getState().getIn(['timelines', 'accounts_timelines', id], Immutable.List()).last();
+    const lastId = getState().getIn(['timelines', 'accounts_timelines', id, 'items'], Immutable.List()).last();
 
     dispatch(expandAccountTimelineRequest(id));
 
-    api(getState).get(`/api/v1/accounts/${id}/statuses?max_id=${lastId}`).then(response => {
+    api(getState).get(`/api/v1/accounts/${id}/statuses`, {
+      params: {
+        limit: 10,
+        max_id: lastId
+      }
+    }).then(response => {
       dispatch(expandAccountTimelineSuccess(id, response.data));
     }).catch(error => {
       dispatch(expandAccountTimelineFail(id, error));