From a69e56799193ef9b1e5ea9c96bbf0bcc28158d3f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 25 Apr 2024 15:39:28 -0500 Subject: [Session] Drill into `getAgent` into `whenAppViewReady` (#3702) * Drill into whenAppViewReady (cherry picked from commit e290e5be3df509bdd9d0e626a164996c9dee3636) * Drill getAgent instead --------- Co-authored-by: Dan Abramov --- src/state/queries/profile.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/state/queries/profile.ts') diff --git a/src/state/queries/profile.ts b/src/state/queries/profile.ts index 7842d53d4..0d5d5e5bd 100644 --- a/src/state/queries/profile.ts +++ b/src/state/queries/profile.ts @@ -8,6 +8,7 @@ import { AppBskyEmbedRecordWithMedia, AppBskyFeedDefs, AtUri, + BskyAgent, } from '@atproto/api' import { QueryClient, @@ -154,6 +155,7 @@ export function useProfileUpdateMutation() { return existing }) await whenAppViewReady( + getAgent, profile.did, checkCommitted || (res => { @@ -516,6 +518,7 @@ export function precacheThreadPostProfiles( } async function whenAppViewReady( + getAgent: () => BskyAgent, actor: string, fn: (res: AppBskyActorGetProfile.Response) => boolean, ) { -- cgit 1.4.1