Fix avatar shape in Account switch menu (#7388)
This commit is contained in:
@@ -131,7 +131,11 @@ function AccountItem({
|
|||||||
(hovered || pressed || isPendingAccount) && t.atoms.bg_contrast_25,
|
(hovered || pressed || isPendingAccount) && t.atoms.bg_contrast_25,
|
||||||
]}>
|
]}>
|
||||||
<View style={a.p_md}>
|
<View style={a.p_md}>
|
||||||
<UserAvatar avatar={profile?.avatar} size={24} />
|
<UserAvatar
|
||||||
|
avatar={profile?.avatar}
|
||||||
|
size={24}
|
||||||
|
type={profile?.associated?.labeler ? 'labeler' : 'user'}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
<Text style={[a.align_baseline, a.flex_1, a.flex_row, a.py_sm]}>
|
<Text style={[a.align_baseline, a.flex_1, a.flex_row, a.py_sm]}>
|
||||||
<Text emoji style={[a.font_bold]}>
|
<Text emoji style={[a.font_bold]}>
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ export function AvatarStack({
|
|||||||
<UserAvatar
|
<UserAvatar
|
||||||
size={size - 2}
|
size={size - 2}
|
||||||
avatar={item.profile.avatar}
|
avatar={item.profile.avatar}
|
||||||
|
type={item.profile.associated?.labeler ? 'labeler' : 'user'}
|
||||||
moderation={item.moderation.ui('avatar')}
|
moderation={item.moderation.ui('avatar')}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ function KnownFollowersInner({
|
|||||||
size={SIZE}
|
size={SIZE}
|
||||||
avatar={prof.avatar}
|
avatar={prof.avatar}
|
||||||
moderation={moderation.ui('avatar')}
|
moderation={moderation.ui('avatar')}
|
||||||
|
type={prof.associated?.labeler ? 'labeler' : 'user'}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export function Label({
|
|||||||
fill={t.atoms.text_contrast_medium.color}
|
fill={t.atoms.text_contrast_medium.color}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<UserAvatar avatar={desc.sourceAvi} size={avi} />
|
<UserAvatar avatar={desc.sourceAvi} type="user" size={avi} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ function ProfilePreview({
|
|||||||
size={80}
|
size={80}
|
||||||
avatar={shadow.avatar}
|
avatar={shadow.avatar}
|
||||||
moderation={moderation.ui('avatar')}
|
moderation={moderation.ui('avatar')}
|
||||||
|
type={shadow.associated?.labeler ? 'labeler' : 'user'}
|
||||||
/>
|
/>
|
||||||
<ProfileHeaderDisplayName profile={shadow} moderation={moderation} />
|
<ProfileHeaderDisplayName profile={shadow} moderation={moderation} />
|
||||||
<ProfileHeaderHandle profile={shadow} />
|
<ProfileHeaderHandle profile={shadow} />
|
||||||
@@ -414,6 +415,7 @@ function AccountRow({
|
|||||||
size={28}
|
size={28}
|
||||||
avatar={profile.avatar}
|
avatar={profile.avatar}
|
||||||
moderation={moderateProfile(profile, moderationOpts).ui('avatar')}
|
moderation={moderateProfile(profile, moderationOpts).ui('avatar')}
|
||||||
|
type={profile.associated?.labeler ? 'labeler' : 'user'}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<View style={[{width: 28}]} />
|
<View style={[{width: 28}]} />
|
||||||
|
|||||||
@@ -33,7 +33,11 @@ export function PostThreadLoadMore({post}: {post: AppBskyFeedDefs.PostView}) {
|
|||||||
backgroundColor: t.atoms.bg.backgroundColor,
|
backgroundColor: t.atoms.bg.backgroundColor,
|
||||||
marginRight: -20,
|
marginRight: -20,
|
||||||
}}>
|
}}>
|
||||||
<UserAvatar avatar={post.author.avatar} size={30} />
|
<UserAvatar
|
||||||
|
avatar={post.author.avatar}
|
||||||
|
size={30}
|
||||||
|
type={post.author.associated?.labeler ? 'labeler' : 'user'}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
@@ -44,7 +48,11 @@ export function PostThreadLoadMore({post}: {post: AppBskyFeedDefs.PostView}) {
|
|||||||
borderRadius: 18,
|
borderRadius: 18,
|
||||||
backgroundColor: t.atoms.bg.backgroundColor,
|
backgroundColor: t.atoms.bg.backgroundColor,
|
||||||
}}>
|
}}>
|
||||||
<UserAvatar avatar={post.author.avatar} size={30} />
|
<UserAvatar
|
||||||
|
avatar={post.author.avatar}
|
||||||
|
size={30}
|
||||||
|
type={post.author.associated?.labeler ? 'labeler' : 'user'}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={[a.px_sm]}>
|
<View style={[a.px_sm]}>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ interface BaseUserAvatarProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface UserAvatarProps extends BaseUserAvatarProps {
|
interface UserAvatarProps extends BaseUserAvatarProps {
|
||||||
|
type: UserAvatarType
|
||||||
moderation?: ModerationUI
|
moderation?: ModerationUI
|
||||||
usePlainRNImage?: boolean
|
usePlainRNImage?: boolean
|
||||||
onLoad?: () => void
|
onLoad?: () => void
|
||||||
@@ -439,7 +440,12 @@ let PreviewableUserAvatar = ({
|
|||||||
handle: profile.handle,
|
handle: profile.handle,
|
||||||
})}
|
})}
|
||||||
onPress={onPress}>
|
onPress={onPress}>
|
||||||
<UserAvatar avatar={profile.avatar} moderation={moderation} {...rest} />
|
<UserAvatar
|
||||||
|
avatar={profile.avatar}
|
||||||
|
moderation={moderation}
|
||||||
|
type={profile.associated?.labeler ? 'labeler' : 'user'}
|
||||||
|
{...rest}
|
||||||
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
</ProfileHoverCard>
|
</ProfileHoverCard>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ function LoadMore({
|
|||||||
size={28}
|
size={28}
|
||||||
avatar={_item.avatar}
|
avatar={_item.avatar}
|
||||||
moderation={_item.moderation.ui('avatar')}
|
moderation={_item.moderation.ui('avatar')}
|
||||||
|
type="user"
|
||||||
/>
|
/>
|
||||||
) : _item.type === 'feed' ? (
|
) : _item.type === 'feed' ? (
|
||||||
<UserAvatar
|
<UserAvatar
|
||||||
|
|||||||
Reference in New Issue
Block a user