[SDK] Migrate getAllListMembers to the appview client (#11377)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-13 22:26:19 +03:00
committed by GitHub
parent f6a22c4f05
commit 3568cdc42d
5 changed files with 30 additions and 26 deletions
@@ -20,7 +20,7 @@ import {wait} from '#/lib/async/wait'
import {type NavigationProp} from '#/lib/routes/types'
import {logger} from '#/logger'
import {getAllListMembers} from '#/state/queries/list-members'
import {useAgent, useSession} from '#/state/session'
import {useAgent, useAppviewClient, useSession} from '#/state/session'
import {atoms as a, platform, useTheme, web} from '#/alf'
import {Admonition} from '#/components/Admonition'
import {Button, ButtonText} from '#/components/Button'
@@ -41,6 +41,7 @@ export function CreateListFromStarterPackDialog({
const {_} = useLingui()
const t = useTheme()
const agent = useAgent()
const appviewClient = useAppviewClient()
const ax = useAnalytics()
const {currentAccount} = useSession()
const navigation = useNavigation<NavigationProp>()
@@ -73,7 +74,10 @@ export function CreateListFromStarterPackDialog({
const listItems = await wait(
3000,
(async () => {
const items = await getAllListMembers(agent, starterPack.list!.uri)
const items = await getAllListMembers(
appviewClient,
starterPack.list!.uri,
)
if (items.length > 0) {
const listitemWrites: $Typed<ComAtprotoRepoApplyWrites.Create>[] =