Use randomized setTimeout when fallback-polling and re-add since_id (#7522)
This commit is contained in:
parent
1e02dc8715
commit
dafd7afc5e
4 changed files with 43 additions and 19 deletions
|
@ -36,10 +36,9 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null)
|
|||
});
|
||||
}
|
||||
|
||||
function refreshHomeTimelineAndNotification (dispatch) {
|
||||
dispatch(expandHomeTimeline());
|
||||
dispatch(expandNotifications());
|
||||
}
|
||||
const refreshHomeTimelineAndNotification = (dispatch, done) => {
|
||||
dispatch(expandHomeTimeline({}, () => dispatch(expandNotifications({}, done))));
|
||||
};
|
||||
|
||||
export const connectUserStream = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);
|
||||
export const connectCommunityStream = () => connectTimelineStream('community', 'public:local');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue