Revert infinite scroll in timelines back to looking at ID of oldest
loaded status; do not preload submitted statuses into community/public timelines, unless those timelines have already been loaded; do not close streaming API connections for community/public timelines, once they have been established (most users navigate back to them eventually)
This commit is contained in:
@ -106,18 +106,20 @@ export function expandTimeline(timeline) {
|
||||
return;
|
||||
}
|
||||
|
||||
const next = getState().getIn(['timelines', timeline, 'next']);
|
||||
const params = getState().getIn(['timelines', timeline, 'params'], {});
|
||||
|
||||
if (next === null) {
|
||||
if (getState().getIn(['timelines', timeline, 'items']).size === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const path = getState().getIn(['timelines', timeline, 'path'])(getState().getIn(['timelines', timeline, 'id']));
|
||||
const params = getState().getIn(['timelines', timeline, 'params'], {});
|
||||
const lastId = getState().getIn(['timelines', timeline, 'items']).last();
|
||||
|
||||
dispatch(expandTimelineRequest(timeline));
|
||||
|
||||
api(getState).get(next, {
|
||||
api(getState).get(path, {
|
||||
params: {
|
||||
...params,
|
||||
max_id: lastId,
|
||||
limit: 10
|
||||
}
|
||||
}).then(response => {
|
||||
|
Reference in New Issue
Block a user