about summary refs log tree commit diff
path: root/src/view/com/util/UserAvatar.tsx
diff options
context:
space:
mode:
authorElijah Seed-Arita <elijaharita@gmail.com>2025-07-24 11:22:19 -0700
committerGitHub <noreply@github.com>2025-07-24 11:22:19 -0700
commitdff0332dd0326b446a07d39f70df45aab178e4c4 (patch)
treee023540e0f328f036a037be87bc002597b078061 /src/view/com/util/UserAvatar.tsx
parentf0b869aeeb9d531b0428e3a62201358d95ffc2ec (diff)
downloadvoidsky-dff0332dd0326b446a07d39f70df45aab178e4c4.tar.zst
fix: general profile component layout fixes, and ability to disable the inset border for UserAvatar (#8711)
Diffstat (limited to 'src/view/com/util/UserAvatar.tsx')
-rw-r--r--src/view/com/util/UserAvatar.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx
index 97cd831b3..e83921b0b 100644
--- a/src/view/com/util/UserAvatar.tsx
+++ b/src/view/com/util/UserAvatar.tsx
@@ -70,6 +70,7 @@ interface UserAvatarProps extends BaseUserAvatarProps {
   type: UserAvatarType
   moderation?: ModerationUI
   usePlainRNImage?: boolean
+  noBorder?: boolean
   onLoad?: () => void
   style?: StyleProp<ViewStyle>
 }
@@ -219,6 +220,7 @@ let UserAvatar = ({
   style,
   live,
   hideLiveBadge,
+  noBorder,
 }: UserAvatarProps): React.ReactNode => {
   const t = useTheme()
   const finalShape = overrideShape ?? (type === 'user' ? 'circle' : 'square')
@@ -309,7 +311,7 @@ let UserAvatar = ({
           onLoad={onLoad}
         />
       )}
-      <MediaInsetBorder style={borderStyle} />
+      {!noBorder && <MediaInsetBorder style={borderStyle} />}
       {live && size > 16 && !hideLiveBadge && (
         <LiveIndicator size={size > 32 ? 'small' : 'tiny'} />
       )}
@@ -318,7 +320,7 @@ let UserAvatar = ({
   ) : (
     <View style={containerStyle}>
       <DefaultAvatar type={type} shape={finalShape} size={size} />
-      <MediaInsetBorder style={borderStyle} />
+      {!noBorder && <MediaInsetBorder style={borderStyle} />}
       {live && size > 16 && !hideLiveBadge && (
         <LiveIndicator size={size > 32 ? 'small' : 'tiny'} />
       )}