From 67e12154538f443ec51cb1bb1086336dfda42ea2 Mon Sep 17 00:00:00 2001
From: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
Date: Tue, 7 Apr 2026 14:29:58 -0700
Subject: [PATCH] Display user avatars in cluster if available (#10198)
---
src/components/AvatarBubbles.tsx | 65 ++++++++++++++-----
src/screens/Messages/ConversationSettings.tsx | 2 +-
2 files changed, 49 insertions(+), 18 deletions(-)
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() {
-
+