Filter deleted convos from inbox (#7944)
* filter deleted convos from inbox * fix logic
This commit is contained in:
@@ -131,7 +131,8 @@ export function MessagesScreen({navigation, route}: Props) {
|
||||
convo =>
|
||||
!leftConvos.includes(convo.id) &&
|
||||
!convo.muted &&
|
||||
convo.unreadCount > 0,
|
||||
convo.unreadCount > 0 &&
|
||||
convo.members.every(member => member.handle !== 'missing.invalid'),
|
||||
) ?? []
|
||||
|
||||
return inbox
|
||||
|
||||
@@ -60,7 +60,12 @@ export function MessagesInboxScreen({}: Props) {
|
||||
}, [data, leftConvos])
|
||||
|
||||
const hasUnreadConvos = useMemo(() => {
|
||||
return conversations.some(conversation => conversation.unreadCount > 0)
|
||||
return conversations.some(
|
||||
conversation =>
|
||||
conversation.members.every(
|
||||
member => member.handle !== 'missing.invalid',
|
||||
) && conversation.unreadCount > 0,
|
||||
)
|
||||
}, [conversations])
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user