aboutsummaryrefslogtreecommitdiff
path: root/src/services/timeline_fetcher/timeline_fetcher.service.js
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-04-04 15:10:34 -0400
committertaehoon <th.dev91@gmail.com>2019-05-15 12:04:24 -0400
commit2c89d49a3d22ed2813a6a57fb6049341fa8624ba (patch)
tree4e7e97bdadc4a1aeeac28a8258c429a991efecb2 /src/services/timeline_fetcher/timeline_fetcher.service.js
parente28b19645aa6a546f8d1980fa479f20d3c48ff36 (diff)
#468 - show pinned timeline and add pinned label to the status
Diffstat (limited to 'src/services/timeline_fetcher/timeline_fetcher.service.js')
-rw-r--r--src/services/timeline_fetcher/timeline_fetcher.service.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js
index 8e954cdf..e8d9a2ed 100644
--- a/src/services/timeline_fetcher/timeline_fetcher.service.js
+++ b/src/services/timeline_fetcher/timeline_fetcher.service.js
@@ -16,6 +16,12 @@ const update = ({store, statuses, timeline, showImmediately, userId}) => {
}
const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false, showImmediately = false, userId = false, tag = false, until}) => {
+ if (timeline === 'pinned') {
+ return apiService.fetchPinnedStatuses({ id: userId, credentials })
+ .then(statuses => {
+ update({ store, statuses, timeline, showImmediately, userId })
+ })
+ }
const args = { timeline, credentials }
const rootState = store.rootState || store.state
const timelineData = rootState.statuses.timelines[camelCase(timeline)]