diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-05-27 19:42:45 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-05-29 21:25:28 +0200 |
commit | cc589d6ec06e562c0bf43c415f816b2b922ebd0c (patch) | |
tree | 759271a9439547bbd5e12eddad1f7056164f48a0 /app/javascript/flavours/glitch/actions/streaming.js | |
parent | fbc25bdd2dfbc0c2316c5bdae6b8da0c047375c2 (diff) |
[Glitch] Use randomized setTimeout when fallback-polling and re-add since_id
Port dafd7afc5ef94fc9513efa341910f7e3c31b909a to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/actions/streaming.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/streaming.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/actions/streaming.js b/app/javascript/flavours/glitch/actions/streaming.js index ac69c8b43..6e34d0be6 100644 --- a/app/javascript/flavours/glitch/actions/streaming.js +++ b/app/javascript/flavours/glitch/actions/streaming.js @@ -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'); |