diff options
Diffstat (limited to 'app/javascript/mastodon/actions/timelines.js')
-rw-r--r-- | app/javascript/mastodon/actions/timelines.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js index f0ab16a2d..e5748b4e7 100644 --- a/app/javascript/mastodon/actions/timelines.js +++ b/app/javascript/mastodon/actions/timelines.js @@ -1,3 +1,4 @@ +import { importFetchedStatus, importFetchedStatuses } from './importer'; import api, { getLinks } from '../api'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; @@ -44,6 +45,8 @@ export function updateTimeline(timeline, status) { } } + dispatch(importFetchedStatus(status)); + dispatch({ type: TIMELINE_UPDATE, timeline, @@ -109,6 +112,7 @@ export function refreshTimeline(timelineId, path, params = {}) { dispatch(refreshTimelineSuccess(timelineId, [], skipLoading, null, true)); } else { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedStatuses(response.data)); dispatch(refreshTimelineSuccess(timelineId, response.data, skipLoading, next ? next.uri : null, false)); } }).catch(error => { @@ -152,6 +156,7 @@ export function expandTimeline(timelineId, path, params = {}) { api(getState).get(path, { params }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); + dispatch(importFetchedStatuses(response.data)); dispatch(expandTimelineSuccess(timelineId, response.data, next ? next.uri : null)); }).catch(error => { dispatch(expandTimelineFail(timelineId, error)); |