hide profile badges when in left panel

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