aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-07-20 08:22:51 +0000
committerShpuld Shpludson <shp@cock.li>2020-07-20 08:22:51 +0000
commit92377beab12cf55df146fce417ba17276515fa61 (patch)
treef63c1c1c5c515050db7dc896e8b8b904e9d6d02f /src
parent067caacb296bb26a6d7197426f36be1f4ff079b7 (diff)
parent5b9d22e2c5b339cadc54e0742f7d1d8c963e4a6a (diff)
Merge branch 'fix-notification-polling' into 'develop'
Fix the notifications polling when all the latest notifications are unread Closes #896 See merge request pleroma/pleroma-fe!1198
Diffstat (limited to 'src')
-rw-r--r--src/services/notifications_fetcher/notifications_fetcher.service.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js
index d282074a..80be02ca 100644
--- a/src/services/notifications_fetcher/notifications_fetcher.service.js
+++ b/src/services/notifications_fetcher/notifications_fetcher.service.js
@@ -35,7 +35,7 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => {
const notifications = timelineData.data
const readNotifsIds = notifications.filter(n => n.seen).map(n => n.id)
const numUnseenNotifs = notifications.length - readNotifsIds.length
- if (numUnseenNotifs > 0) {
+ if (numUnseenNotifs > 0 && readNotifsIds.length > 0) {
args['since'] = Math.max(...readNotifsIds)
fetchNotifications({ store, args, older })
}