diff options
| author | wakarimasen <wakarimasen@airmail.cc> | 2017-03-10 12:29:21 +0100 |
|---|---|---|
| committer | wakarimasen <wakarimasen@airmail.cc> | 2017-03-10 12:38:47 +0100 |
| commit | 896de016adbabd142c09476a323f4e02cefa88c9 (patch) | |
| tree | a2cec29e4afab22aeec5e7ed41b25a19263402d3 /src/services/timeline_fetcher/timeline_fetcher.service.js | |
| parent | 2f52669380703030aa8e197deb05240c5f3bf979 (diff) | |
| parent | bfbbb527677ba4648b1be376bb02b0bd3c3e29ba (diff) | |
Merge branch 'develop' of https://gitgud.io/lambadalambda/pleroma-fe into wakarimasen/pleroma-fe-develop
Diffstat (limited to 'src/services/timeline_fetcher/timeline_fetcher.service.js')
| -rw-r--r-- | src/services/timeline_fetcher/timeline_fetcher.service.js | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js index e684a170..24aef069 100644 --- a/src/services/timeline_fetcher/timeline_fetcher.service.js +++ b/src/services/timeline_fetcher/timeline_fetcher.service.js @@ -5,7 +5,7 @@ import apiService from '../api/api.service.js' const update = ({store, statuses, timeline, showImmediately}) => { const ccTimeline = camelCase(timeline) - setError({store, timeline, value: false}) + store.dispatch('setError', { value: false }) store.dispatch('addNewStatuses', { timeline: ccTimeline, @@ -14,15 +14,6 @@ const update = ({store, statuses, timeline, showImmediately}) => { }) } -const setError = ({store, timeline, value}) => { - const ccTimeline = camelCase(timeline) - - store.dispatch('setError', { - timeline: ccTimeline, - value - }) -} - const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false, showImmediately = false}) => { const args = { timeline, credentials } const rootState = store.rootState || store.state @@ -36,7 +27,7 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false return apiService.fetchTimeline(args) .then((statuses) => update({store, statuses, timeline, showImmediately}), - () => setError({store, timeline, value: true})) + () => store.dispatch('setError', { value: true })) } const startFetching = ({ timeline = 'friends', credentials, store }) => { |
