Smarter infinite scroll

This commit is contained in:
Eugen Rochko
2017-01-24 04:12:10 +01:00
parent 1761d3f9c3
commit d9022884c6
7 changed files with 74 additions and 24 deletions

View File

@ -115,7 +115,12 @@ export function expandTimeline(timeline, id = null) {
path = `${path}/${id}`
}
api(getState).get(`/api/v1/timelines/${path}?max_id=${lastId}`).then(response => {
api(getState).get(`/api/v1/timelines/${path}`, {
params: {
limit: 10,
max_id: lastId
}
}).then(response => {
dispatch(expandTimelineSuccess(timeline, response.data));
}).catch(error => {
dispatch(expandTimelineFail(timeline, error));