Group Clops Feature Branch (#10360)

Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eric Bailey
2026-04-24 13:38:50 -05:00
committed by GitHub
parent e832791367
commit cdb8d4bfb8
63 changed files with 3517 additions and 1844 deletions
+14 -5
View File
@@ -98,11 +98,16 @@ function reducer(state: State, action: Action): State {
}
export function AddMembersFlow({
members,
title,
onAddMembers,
}: {
members: string[]
title: string
onAddMembers: (dids: string[]) => void
onAddMembers: (
dids: string[],
profiles: bsky.profile.AnyProfileView[],
) => void
}) {
const t = useTheme()
const {t: l} = useLingui()
@@ -154,7 +159,11 @@ export function AddMembersFlow({
} else if (searchText.length) {
if (results?.length) {
for (const profile of results) {
if (profile.did === currentAccount?.did) continue
if (
profile.did === currentAccount?.did ||
members.includes(profile.did)
)
continue
_items.push({
type: 'profile',
key: profile.did,
@@ -202,7 +211,7 @@ export function AddMembersFlow({
}
return _items
}, [isError, searchText, l, results, currentAccount?.did, follows])
}, [isError, searchText, l, results, currentAccount?.did, members, follows])
if (searchText && !isFetching && !items.length && !isError) {
items.push({type: 'empty', key: 'empty', message: l`No results`})
@@ -213,8 +222,8 @@ export function AddMembersFlow({
}, [control])
const handlePressAdd = useCallback(() => {
onAddMembers(groupChatDids)
}, [groupChatDids, onAddMembers])
onAddMembers(groupChatDids, groupChatProfiles)
}, [groupChatDids, groupChatProfiles, onAddMembers])
const renderItems = useCallback(
({item}: {item: Item}) => {