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 =>
|
convo =>
|
||||||
!leftConvos.includes(convo.id) &&
|
!leftConvos.includes(convo.id) &&
|
||||||
!convo.muted &&
|
!convo.muted &&
|
||||||
convo.unreadCount > 0,
|
convo.unreadCount > 0 &&
|
||||||
|
convo.members.every(member => member.handle !== 'missing.invalid'),
|
||||||
) ?? []
|
) ?? []
|
||||||
|
|
||||||
return inbox
|
return inbox
|
||||||
|
|||||||
@@ -60,7 +60,12 @@ export function MessagesInboxScreen({}: Props) {
|
|||||||
}, [data, leftConvos])
|
}, [data, leftConvos])
|
||||||
|
|
||||||
const hasUnreadConvos = useMemo(() => {
|
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])
|
}, [conversations])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user