Ensure deleted chats don't count towards unread (#4129)
parent
e98bf6521b
commit
22522090c2
|
@ -59,7 +59,10 @@ export function useUnreadMessageCount() {
|
||||||
|
|
||||||
// TODO could shadow this outside this hook and get optimistic block state
|
// TODO could shadow this outside this hook and get optimistic block state
|
||||||
const moderation = moderateProfile(otherMember, moderationOpts)
|
const moderation = moderateProfile(otherMember, moderationOpts)
|
||||||
const shouldIgnore = convo.muted || moderation.blocked
|
const shouldIgnore =
|
||||||
|
convo.muted ||
|
||||||
|
moderation.blocked ||
|
||||||
|
otherMember.did === 'missing.invalid'
|
||||||
const unreadCount = !shouldIgnore && convo.unreadCount > 0 ? 1 : 0
|
const unreadCount = !shouldIgnore && convo.unreadCount > 0 ? 1 : 0
|
||||||
|
|
||||||
return acc + unreadCount
|
return acc + unreadCount
|
||||||
|
|
Loading…
Reference in New Issue