logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 92377beab12cf55df146fce417ba17276515fa61
parent 067caacb296bb26a6d7197426f36be1f4ff079b7
Author: Shpuld Shpludson <shp@cock.li>
Date:   Mon, 20 Jul 2020 08:22:51 +0000

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:

Msrc/services/notifications_fetcher/notifications_fetcher.service.js2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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 }) }