More notifications improvements (#2198)
* On mobile, never replace the notifs under the user due to focus events * Use the server's seenAt response to calculate isRead state locally
This commit is contained in:
parent
eecf04489f
commit
e3ba014be0
6 changed files with 42 additions and 29 deletions
|
@ -68,8 +68,14 @@ export async function fetchPage({
|
|||
notif => !isThreadMuted(notif, threadMutes),
|
||||
)
|
||||
|
||||
let seenAt = res.data.seenAt ? new Date(res.data.seenAt) : new Date()
|
||||
if (Number.isNaN(seenAt.getTime())) {
|
||||
seenAt = new Date()
|
||||
}
|
||||
|
||||
return {
|
||||
cursor: res.data.cursor,
|
||||
seenAt,
|
||||
items: notifsGrouped,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue