diff options
Diffstat (limited to 'src/screens/Messages/List/ChatListItem.tsx')
-rw-r--r-- | src/screens/Messages/List/ChatListItem.tsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/screens/Messages/List/ChatListItem.tsx b/src/screens/Messages/List/ChatListItem.tsx index a7b7e0680..791dc82c0 100644 --- a/src/screens/Messages/List/ChatListItem.tsx +++ b/src/screens/Messages/List/ChatListItem.tsx @@ -65,6 +65,17 @@ function ChatListItemReady({ [profile, moderationOpts], ) + const blockInfo = React.useMemo(() => { + const modui = moderation.ui('profileView') + const blocks = modui.alerts.filter(alert => alert.type === 'blocking') + const listBlocks = blocks.filter(alert => alert.source.type === 'list') + const userBlock = blocks.find(alert => alert.source.type === 'user') + return { + listBlocks, + userBlock, + } + }, [moderation]) + const isDeletedAccount = profile.handle === 'missing.invalid' const displayName = isDeletedAccount ? 'Deleted Account' @@ -241,7 +252,7 @@ function ChatListItemReady({ triggerOpacity={ !gtMobile || showActions || menuControl.isOpen ? 1 : 0 } - moderation={moderation} + blockInfo={blockInfo} /> </View> </View> |