hide profile badges when in left panel
This commit is contained in:
@@ -51,6 +51,7 @@ import {Text} from '#/components/Typography'
|
||||
import {useAnalytics} from '#/analytics'
|
||||
import {IS_NATIVE} from '#/env'
|
||||
import type * as bsky from '#/types/bsky'
|
||||
import {useIsWithinSplitView} from './splitView/context'
|
||||
|
||||
export const ChatListItemPortal = createPortalGroup()
|
||||
|
||||
@@ -118,6 +119,7 @@ function DirectChatItem({
|
||||
}) {
|
||||
const {t: l} = useLingui()
|
||||
const profile = useProfileShadow(convo.primaryMember)
|
||||
const {isWithinLeftPanel} = useIsWithinSplitView()
|
||||
|
||||
const moderation = useMemo(
|
||||
() => moderateProfile(profile, moderationOpts),
|
||||
@@ -156,11 +158,13 @@ function DirectChatItem({
|
||||
isBlockedAccount={moderation.blocked}
|
||||
showProfileBadges
|
||||
postAlerts={
|
||||
<PostAlerts
|
||||
modui={moderation.ui('contentList')}
|
||||
size="lg"
|
||||
style={[a.pt_xs]}
|
||||
/>
|
||||
isWithinLeftPanel ? null : (
|
||||
<PostAlerts
|
||||
modui={moderation.ui('contentList')}
|
||||
size="sm"
|
||||
style={[a.pb_2xs, a.max_w_full, a.overflow_hidden]}
|
||||
/>
|
||||
)
|
||||
}>
|
||||
{children}
|
||||
</BaseChatItem>
|
||||
@@ -496,7 +500,7 @@ function BaseChatItem({
|
||||
{showProfileBadges && primaryProfile && (
|
||||
<ProfileBadges
|
||||
profile={primaryProfile}
|
||||
size="md"
|
||||
size="sm"
|
||||
style={[a.pl_xs, a.self_center]}
|
||||
/>
|
||||
)}
|
||||
@@ -548,6 +552,8 @@ function BaseChatItem({
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{postAlerts}
|
||||
|
||||
<View style={[a.flex_row, a.align_center]}>
|
||||
{LastMessageIcon && (
|
||||
<LastMessageIcon
|
||||
@@ -570,8 +576,6 @@ function BaseChatItem({
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{postAlerts}
|
||||
|
||||
{children}
|
||||
</View>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user