tighten AvatarBubbles profiles type to non-nullable

Now that the count prop drives placeholder slots, callers no longer need to pad
the profiles array with undefined, so the prop can be AnyProfileView[]. Drops
the now-dead falsy check in the self-filter and the defensive ?? undefined at
the one call site that had it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-06-12 16:04:19 +03:00
parent c1cb0d1f7c
commit 72c6115d6a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ export function AvatarBubbles({
count,
}: {
animate?: boolean
profiles: (bsky.profile.AnyProfileView | undefined)[]
profiles: bsky.profile.AnyProfileView[]
/**
* By default, when there are more than 2 profiles, the current user is
* filtered out (so you don't see yourself among your own group's members).
@@ -54,7 +54,7 @@ export function AvatarBubbles({
const {currentAccount} = useSession()
const profiles =
!self && allProfiles.length > 2
? allProfiles.filter(p => !p || p.did !== currentAccount?.did)
? allProfiles.filter(p => p.did !== currentAccount?.did)
: allProfiles
const bubbleCount = Math.max(profiles.length, count ?? 0)
@@ -63,7 +63,7 @@ export function OutgoingRequestListItem({
(hovered || pressed || focused) && t.atoms.bg_contrast_25,
]}>
<AvatarBubbles
profiles={[convoView?.owner ?? undefined]}
profiles={[convoView.owner]}
count={convoView.memberCount}
size={48}
/>