Allow clients to fetch statuses made while they were offline (#6876)

This commit is contained in:
Akihiko Odaki
2018-03-24 23:25:15 +09:00
committed by Eugen Rochko
parent 59657e24b9
commit 9a1a55ce52
22 changed files with 191 additions and 259 deletions

View File

@ -2,8 +2,7 @@ import { connectStream } from '../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());
}