diff options
| author | lambadalambda <gitgud@rogerbraun.net> | 2017-09-17 07:58:05 -0400 |
|---|---|---|
| committer | lambadalambda <gitgud@rogerbraun.net> | 2017-09-17 07:58:05 -0400 |
| commit | 91991e2ac1765a17bc5cd0038507c577a0d12045 (patch) | |
| tree | 3b76538396254fdcddf49e8b73d32db4ae41ee5c /src/services/timeline_fetcher/timeline_fetcher.service.js | |
| parent | 3eaaa4c16de3355e47d1a8c5c74e19cc492e37a5 (diff) | |
| parent | c96a7b582bfc12b4af437fbd0d75ed8762065288 (diff) | |
Merge branch 'feature/tag-timelines' into 'develop'
Add tag timeline view.
See merge request !121
Diffstat (limited to 'src/services/timeline_fetcher/timeline_fetcher.service.js')
| -rw-r--r-- | src/services/timeline_fetcher/timeline_fetcher.service.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js index b28de9e7..6b76eb54 100644 --- a/src/services/timeline_fetcher/timeline_fetcher.service.js +++ b/src/services/timeline_fetcher/timeline_fetcher.service.js @@ -14,7 +14,7 @@ const update = ({store, statuses, timeline, showImmediately}) => { }) } -const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false, showImmediately = false, userId = false}) => { +const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false, showImmediately = false, userId = false, tag = false}) => { const args = { timeline, credentials } const rootState = store.rootState || store.state const timelineData = rootState.statuses.timelines[camelCase(timeline)] @@ -26,15 +26,16 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false } args['userId'] = userId + args['tag'] = tag return apiService.fetchTimeline(args) .then((statuses) => update({store, statuses, timeline, showImmediately}), () => store.dispatch('setError', { value: true })) } -const startFetching = ({timeline = 'friends', credentials, store, userId = false}) => { - fetchAndUpdate({timeline, credentials, store, showImmediately: true, userId}) - const boundFetchAndUpdate = () => fetchAndUpdate({ timeline, credentials, store, userId }) +const startFetching = ({timeline = 'friends', credentials, store, userId = false, tag = false}) => { + fetchAndUpdate({timeline, credentials, store, showImmediately: true, userId, tag}) + const boundFetchAndUpdate = () => fetchAndUpdate({ timeline, credentials, store, userId, tag }) return setInterval(boundFetchAndUpdate, 10000) } const timelineFetcher = { |
