Smarter infinite scroll
This commit is contained in:
parent
1761d3f9c3
commit
d9022884c6
7 changed files with 74 additions and 24 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue