diff options
| author | Henry Jameson <spam@hjkos.com> | 2021-01-13 22:17:10 +0200 |
|---|---|---|
| committer | Henry Jameson <spam@hjkos.com> | 2021-01-13 22:17:29 +0200 |
| commit | 9a8bc245a6f76f1a41da9d05408dadc36625ffe9 (patch) | |
| tree | e193ee2126a86d84369b95d1eb47d69cc13cfda4 /src/services/notifications_fetcher | |
| parent | 48bef143d86b02d7feeeac3e1faa0e5e00e09ea6 (diff) | |
fixed few-posts TLs when streaming is enabled
Diffstat (limited to 'src/services/notifications_fetcher')
| -rw-r--r-- | src/services/notifications_fetcher/notifications_fetcher.service.js | 6 |
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 beeb167c..f83f871e 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 @@ -22,8 +22,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 }) |
