[Glitch] Allow clients to fetch statuses made while they were offline

Port 9a1a55ce52 to glitch-soc
This commit is contained in:
Thibaut Girka
2018-05-27 19:10:37 +02:00
committed by ThibG
parent 532fb8e215
commit 0ad3eedd4c
21 changed files with 195 additions and 261 deletions

View File

@@ -2,8 +2,7 @@ import { connectStream } from 'flavours/glitch/util/stream';
import {
updateTimeline,
deleteFromTimelines,
refreshHomeTimeline,
connectTimeline,
expandHomeTimeline,
disconnectTimeline,
} from './timelines';
import { updateNotifications, refreshNotifications } from './notifications';
@@ -16,10 +15,6 @@ 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));
},
@@ -42,7 +37,7 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null)
}
function refreshHomeTimelineAndNotification (dispatch) {
dispatch(refreshHomeTimeline());
dispatch(expandHomeTimeline());
dispatch(refreshNotifications());
}