Commit dd740043 authored by Shpuld Shpuldson's avatar Shpuld Shpuldson

Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop

parents 9b8cdb65 b275494a
Pipeline #21750 passed with stages
in 8 minutes and 27 seconds
...@@ -2,7 +2,6 @@ import apiService from '../api/api.service.js' ...@@ -2,7 +2,6 @@ import apiService from '../api/api.service.js'
const update = ({ store, notifications, older }) => { const update = ({ store, notifications, older }) => {
store.dispatch('setNotificationsError', { value: false }) store.dispatch('setNotificationsError', { value: false })
store.dispatch('addNewNotifications', { notifications, older }) store.dispatch('addNewNotifications', { notifications, older })
} }
...@@ -30,9 +29,9 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => { ...@@ -30,9 +29,9 @@ const fetchAndUpdate = ({ store, credentials, older = false }) => {
// load unread notifications repeatedly to provide consistency between browser tabs // load unread notifications repeatedly to provide consistency between browser tabs
const notifications = timelineData.data const notifications = timelineData.data
const unread = notifications.filter(n => !n.seen).map(n => n.id) const readNotifsIds = notifications.filter(n => n.seen).map(n => n.id)
if (unread.length) { if (readNotifsIds.length) {
args['since'] = Math.min(...unread) args['since'] = Math.max(...readNotifsIds)
fetchNotifications({ store, args, older }) fetchNotifications({ store, args, older })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment