Show feedback for Follow button in interstitials (#4738)
* Fix Follow in interstitials * Show feedback in toast
This commit is contained in:
parent
d5fd19df8f
commit
09dfc9edf8
3 changed files with 42 additions and 3 deletions
|
@ -3,6 +3,7 @@ import {Image as RNImage} from 'react-native-image-crop-picker'
|
|||
import {
|
||||
AppBskyActorDefs,
|
||||
AppBskyActorGetProfile,
|
||||
AppBskyActorGetProfiles,
|
||||
AppBskyActorProfile,
|
||||
AtUri,
|
||||
BskyAgent,
|
||||
|
@ -516,11 +517,11 @@ export function* findAllProfilesInQueryData(
|
|||
queryClient: QueryClient,
|
||||
did: string,
|
||||
): Generator<AppBskyActorDefs.ProfileViewDetailed, void> {
|
||||
const queryDatas =
|
||||
const profileQueryDatas =
|
||||
queryClient.getQueriesData<AppBskyActorDefs.ProfileViewDetailed>({
|
||||
queryKey: [RQKEY_ROOT],
|
||||
})
|
||||
for (const [_queryKey, queryData] of queryDatas) {
|
||||
for (const [_queryKey, queryData] of profileQueryDatas) {
|
||||
if (!queryData) {
|
||||
continue
|
||||
}
|
||||
|
@ -528,6 +529,20 @@ export function* findAllProfilesInQueryData(
|
|||
yield queryData
|
||||
}
|
||||
}
|
||||
const profilesQueryDatas =
|
||||
queryClient.getQueriesData<AppBskyActorGetProfiles.OutputSchema>({
|
||||
queryKey: [profilesQueryKeyRoot],
|
||||
})
|
||||
for (const [_queryKey, queryData] of profilesQueryDatas) {
|
||||
if (!queryData) {
|
||||
continue
|
||||
}
|
||||
for (let profile of queryData.profiles) {
|
||||
if (profile.did === did) {
|
||||
yield profile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function findProfileQueryData(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue