aboutsummaryrefslogtreecommitdiff
path: root/src/services/notifications_fetcher/notifications_fetcher.service.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2021-08-08 16:14:22 +0300
committerShpuld Shpuldson <shp@cock.li>2021-08-08 16:14:22 +0300
commitcc170aa3ecffa75004760fc6d02bd87373132f7d (patch)
tree7d187ff11219399318f7482e0bc032cb20d025b9 /src/services/notifications_fetcher/notifications_fetcher.service.js
parentc3fcbbd918ddef4e3f574a464fd10f4899bb2dce (diff)
parent425919a0d292b79869ebefd2a4d52ed4db45d319 (diff)
Update master with 2.4.0
Diffstat (limited to 'src/services/notifications_fetcher/notifications_fetcher.service.js')
-rw-r--r--src/services/notifications_fetcher/notifications_fetcher.service.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js
index 5f9c1e5e..b66fcd67 100644
--- a/src/services/notifications_fetcher/notifications_fetcher.service.js
+++ b/src/services/notifications_fetcher/notifications_fetcher.service.js
@@ -5,7 +5,7 @@ const update = ({ store, notifications, older }) => {
store.dispatch('addNewNotifications', { notifications, older })
}
-const fetchAndUpdate = ({ store, credentials, older = false }) => {
+const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
const args = { credentials }
const { getters } = store
const rootState = store.rootState || store.state
@@ -25,8 +25,10 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => {
return fetchNotifications({ store, args, older })
} else {
// fetch new notifications
- if (timelineData.maxId !== Number.POSITIVE_INFINITY) {
+ if (since === undefined && timelineData.maxId !== Number.POSITIVE_INFINITY) {
args['since'] = timelineData.maxId
+ } else if (since !== null) {
+ args['since'] = since
}
const result = fetchNotifications({ store, args, older })