From d10cbb8f42d022c05f8c4d89f3d3b1a8456c615f Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 9 Jan 2025 00:19:59 +0000 Subject: [PATCH] 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(-) diff --git a/src/components/AccountList.tsx b/src/components/AccountList.tsx index fe0daed50e..0555dd411f 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 aea4725128..1b27a95ace 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 35a346c3a5..b5c501039c 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 974d83593f..3eddf1b9aa 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 780ea77285..27e2ea724d 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 dbd68f8ef5..2496f9d2a4 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 378ea59a4d..e27435c35c 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' ? (