forked from srxl/akkoma-fe
Fix the notifications polling when all the latest notifications are unread
This commit is contained in:
parent
950ae6d89a
commit
5b9d22e2c5
1 changed files with 1 additions and 1 deletions
|
@ -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 })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue