[Session] Drill into getAgent
into whenAppViewReady
(#3702)
* Drill into whenAppViewReady (cherry picked from commit e290e5be3df509bdd9d0e626a164996c9dee3636) * Drill getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
parent
ec37696034
commit
a69e567991
2 changed files with 45 additions and 20 deletions
|
@ -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,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue