aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-01-29 21:04:52 +0200
committershpuld <shp@cock.li>2019-01-29 21:04:52 +0200
commit62e9525724cfff0c3e26b8325b019e926baed1ca (patch)
tree8af3ad998448a09343181774457a08e48c330637 /src/services
parent3cfbf0141f9e5c2c835699c5427d4829da412328 (diff)
Add loading indicator for notifications, make timelines indicate bottoming out when no more statuses
Diffstat (limited to 'src/services')
-rw-r--r--src/services/notifications_fetcher/notifications_fetcher.service.js1
-rw-r--r--src/services/timeline_fetcher/timeline_fetcher.service.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js
index 1480cded..b69ec643 100644
--- a/src/services/notifications_fetcher/notifications_fetcher.service.js
+++ b/src/services/notifications_fetcher/notifications_fetcher.service.js
@@ -24,6 +24,7 @@ const fetchAndUpdate = ({store, credentials, older = false}) => {
return apiService.fetchTimeline(args)
.then((notifications) => {
update({store, notifications, older})
+ return notifications
}, () => store.dispatch('setNotificationsError', { value: true }))
.catch(() => store.dispatch('setNotificationsError', { value: true }))
}
diff --git a/src/services/timeline_fetcher/timeline_fetcher.service.js b/src/services/timeline_fetcher/timeline_fetcher.service.js
index 727f6c60..08d91b5a 100644
--- a/src/services/timeline_fetcher/timeline_fetcher.service.js
+++ b/src/services/timeline_fetcher/timeline_fetcher.service.js
@@ -35,6 +35,7 @@ const fetchAndUpdate = ({store, credentials, timeline = 'friends', older = false
store.dispatch('queueFlush', { timeline: timeline, id: timelineData.maxId })
}
update({store, statuses, timeline, showImmediately, userId})
+ return statuses
}, () => store.dispatch('setError', { value: true }))
}