diff options
| author | shpuld <shpuld@gmail.com> | 2017-03-09 12:45:12 +0200 |
|---|---|---|
| committer | shpuld <shpuld@gmail.com> | 2017-03-09 12:45:12 +0200 |
| commit | d99b9bdac124b6353adfc9ea0fb52a3b380b91a2 (patch) | |
| tree | 7a901e3264dffb7fec2a3c051653023bb0eb6ffe /src/services | |
| parent | 507fe7905052e2dc5e9bf3e1ee3caee5239e353b (diff) | |
| parent | 64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff) | |
Merged with changes in develop & fixed conflicts.
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/timeline_fetcher/timeline_fetcher.service.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js index 40f568c3..e684a170 100644 --- a/src/services/timeline_fetcher/timeline_fetcher.service.js +++ b/src/services/timeline_fetcher/timeline_fetcher.service.js @@ -5,6 +5,8 @@ import apiService from '../api/api.service.js' const update = ({store, statuses, timeline, showImmediately}) => { const ccTimeline = camelCase(timeline) + setError({store, timeline, value: false}) + store.dispatch('addNewStatuses', { timeline: ccTimeline, statuses, @@ -33,9 +35,8 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false } return apiService.fetchTimeline(args) - .then((statuses) => update({store, statuses, timeline, showImmediately})) - .then(() => setError({store, timeline, value: false})) - .catch(() => setError({store, timeline, value: true})) + .then((statuses) => update({store, statuses, timeline, showImmediately}), + () => setError({store, timeline, value: true})) } const startFetching = ({ timeline = 'friends', credentials, store }) => { |
