diff options
author | Reverite <github@reverite.sh> | 2019-03-10 19:19:52 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-03-10 19:19:52 -0700 |
commit | 229e2726cad36066afb210d7087a40cd9f955483 (patch) | |
tree | a14d55e9469f1f339fc40b777827aa4886bb7889 /app/javascript/flavours/glitch/actions/streaming.js | |
parent | 715c552fe4c1b2d59bf1f281d77b6e2546bdb531 (diff) | |
parent | 3cef04610cd809c7bd01adc00d34fb3d25261a16 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/actions/streaming.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/streaming.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/streaming.js b/app/javascript/flavours/glitch/actions/streaming.js index 8c1bd1f08..b5dd70989 100644 --- a/app/javascript/flavours/glitch/actions/streaming.js +++ b/app/javascript/flavours/glitch/actions/streaming.js @@ -3,6 +3,7 @@ import { updateTimeline, deleteFromTimelines, expandHomeTimeline, + connectTimeline, disconnectTimeline, } from './timelines'; import { updateNotifications, expandNotifications } from './notifications'; @@ -15,7 +16,12 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null, return connectStream (path, pollingRefresh, (dispatch, getState) => { const locale = getState().getIn(['meta', 'locale']); + return { + onConnect() { + dispatch(connectTimeline(timelineId)); + }, + onDisconnect() { dispatch(disconnectTimeline(timelineId)); }, |