diff --git a/src/components/AvatarBubbles.tsx b/src/components/AvatarBubbles.tsx index 7a2b025200..ab9af42584 100644 --- a/src/components/AvatarBubbles.tsx +++ b/src/components/AvatarBubbles.tsx @@ -1,10 +1,12 @@ import {type StyleProp, View, type ViewStyle} from 'react-native' +import {UserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, useTheme} from '#/alf' import {Person_Filled_Corner2_Rounded as PersonIcon} from '#/components/icons/Person' +import type * as bsky from '#/types/bsky' type Props = { - profiles: number[] + profiles: bsky.profile.AnyProfileView[] size?: 'small' | 'medium' | 'large' } @@ -18,17 +20,29 @@ export function AvatarBubbles({profiles, size = 'large'}: Props) { let avatars = ( <> - - + 0 ? profiles[0] : undefined} + size={76} + x={-2} + y={-2} + style={[a.z_20]} + /> + = 1 ? profiles[1] : undefined} + size={76} + x={42} + y={42} + style={[a.z_10]} + /> ) if (profiles.length === 3) { avatars = ( <> - - - + + + ) } @@ -36,10 +50,10 @@ export function AvatarBubbles({profiles, size = 'large'}: Props) { if (profiles.length >= 4) { avatars = ( <> - - - - + + + + ) } @@ -68,14 +82,19 @@ export function AvatarBubbles({profiles, size = 'large'}: Props) { ) } -type AvatarBubbleProps = { +function AvatarBubble({ + profile, + size, + style, + x, + y, +}: { + profile?: bsky.profile.AnyProfileView size: number style?: StyleProp x: number y: number -} - -function AvatarBubble({size, style, x, y}: AvatarBubbleProps) { +}) { const t = useTheme() return ( @@ -91,16 +110,28 @@ function AvatarBubble({size, style, x, y}: AvatarBubbleProps) { }, style, ]}> - + {profile ? ( + + ) : ( + + )} ) } -type AvatarProps = { +function Avatar({ + profile, + size = 76, +}: { + profile: bsky.profile.AnyProfileView size?: number +}) { + return ( + + ) } -function AvatarPlaceholder({size = 76}: AvatarProps) { +function AvatarPlaceholder({size = 76}: {size?: number}) { const t = useTheme() return ( diff --git a/src/screens/Messages/ConversationSettings.tsx b/src/screens/Messages/ConversationSettings.tsx index 895836532a..001b032a41 100644 --- a/src/screens/Messages/ConversationSettings.tsx +++ b/src/screens/Messages/ConversationSettings.tsx @@ -500,7 +500,7 @@ function SettingsHeading() { - +