From d10cbb8f42d022c05f8c4d89f3d3b1a8456c615f Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 9 Jan 2025 00:19:59 +0000 Subject: Fix avatar shape in Account switch menu (#7388) --- src/components/AccountList.tsx | 6 +++++- src/components/AvatarStack.tsx | 1 + src/components/KnownFollowers.tsx | 1 + src/components/Pills.tsx | 2 +- src/screens/Settings/Settings.tsx | 2 ++ src/view/com/post-thread/PostThreadLoadMore.tsx | 12 ++++++++++-- src/view/com/util/UserAvatar.tsx | 8 +++++++- src/view/screens/Search/Explore.tsx | 1 + 8 files changed, 28 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/components/AccountList.tsx b/src/components/AccountList.tsx index fe0daed50..0555dd411 100644 --- a/src/components/AccountList.tsx +++ b/src/components/AccountList.tsx @@ -131,7 +131,11 @@ function AccountItem({ (hovered || pressed || isPendingAccount) && t.atoms.bg_contrast_25, ]}> - + diff --git a/src/components/AvatarStack.tsx b/src/components/AvatarStack.tsx index aea472512..1b27a95ac 100644 --- a/src/components/AvatarStack.tsx +++ b/src/components/AvatarStack.tsx @@ -65,6 +65,7 @@ export function AvatarStack({ )} diff --git a/src/components/KnownFollowers.tsx b/src/components/KnownFollowers.tsx index 35a346c3a..b5c501039 100644 --- a/src/components/KnownFollowers.tsx +++ b/src/components/KnownFollowers.tsx @@ -163,6 +163,7 @@ function KnownFollowersInner({ size={SIZE} avatar={prof.avatar} moderation={moderation.ui('avatar')} + type={prof.associated?.labeler ? 'labeler' : 'user'} /> ))} diff --git a/src/components/Pills.tsx b/src/components/Pills.tsx index 974d83593..3eddf1b9a 100644 --- a/src/components/Pills.tsx +++ b/src/components/Pills.tsx @@ -126,7 +126,7 @@ export function Label({ fill={t.atoms.text_contrast_medium.color} /> ) : ( - + )} @@ -414,6 +415,7 @@ function AccountRow({ size={28} avatar={profile.avatar} moderation={moderateProfile(profile, moderationOpts).ui('avatar')} + type={profile.associated?.labeler ? 'labeler' : 'user'} /> ) : ( diff --git a/src/view/com/post-thread/PostThreadLoadMore.tsx b/src/view/com/post-thread/PostThreadLoadMore.tsx index 780ea7728..27e2ea724 100644 --- a/src/view/com/post-thread/PostThreadLoadMore.tsx +++ b/src/view/com/post-thread/PostThreadLoadMore.tsx @@ -33,7 +33,11 @@ export function PostThreadLoadMore({post}: {post: AppBskyFeedDefs.PostView}) { backgroundColor: t.atoms.bg.backgroundColor, marginRight: -20, }}> - + - + diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index dbd68f8ef..2496f9d2a 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -43,6 +43,7 @@ interface BaseUserAvatarProps { } interface UserAvatarProps extends BaseUserAvatarProps { + type: UserAvatarType moderation?: ModerationUI usePlainRNImage?: boolean onLoad?: () => void @@ -439,7 +440,12 @@ let PreviewableUserAvatar = ({ handle: profile.handle, })} onPress={onPress}> - + ) diff --git a/src/view/screens/Search/Explore.tsx b/src/view/screens/Search/Explore.tsx index 378ea59a4..e27435c35 100644 --- a/src/view/screens/Search/Explore.tsx +++ b/src/view/screens/Search/Explore.tsx @@ -194,6 +194,7 @@ function LoadMore({ size={28} avatar={_item.avatar} moderation={_item.moderation.ui('avatar')} + type="user" /> ) : _item.type === 'feed' ? (