diff options
author | Hailey <me@haileyok.com> | 2024-08-22 11:11:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 19:11:51 +0100 |
commit | df5bf28e614150bda5d58b22b7db308f71f70e07 (patch) | |
tree | 4f43e8081bc418ae4a4244ba1de0d4ef3a17c3cf | |
parent | 92989282ae73a1f0f9564c125f2f87a6e9bb154b (diff) | |
download | voidsky-df5bf28e614150bda5d58b22b7db308f71f70e07.tar.zst |
update `usePostThreadQuery` to check quote query data (#4975)
* update `usePostThreadQuery` to check quote query data * search notifs before quotes * oops
-rw-r--r-- | src/state/queries/list-members.ts | 2 | ||||
-rw-r--r-- | src/state/queries/post-thread.ts | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/state/queries/list-members.ts b/src/state/queries/list-members.ts index 1aeb1bdd4..82c395518 100644 --- a/src/state/queries/list-members.ts +++ b/src/state/queries/list-members.ts @@ -75,8 +75,8 @@ export async function getAllListMembers(agent: BskyAgent, uri: string) { listItems.push(...res.data.items) hasMore = Boolean(res.data.cursor) cursor = res.data.cursor + i++ } - i++ return listItems } diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index 3370c3617..2c4a36c01 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -13,6 +13,7 @@ import {QueryClient, useQuery, useQueryClient} from '@tanstack/react-query' import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types' import {useAgent} from '#/state/session' +import {findAllPostsInQueryData as findAllPostsInQuoteQueryData} from 'state/queries/post-quotes' import { findAllPostsInQueryData as findAllPostsInSearchQueryData, findAllProfilesInQueryData as findAllProfilesInSearchQueryData, @@ -402,6 +403,9 @@ export function* findAllPostsInQueryData( for (let post of findAllPostsInNotifsQueryData(queryClient, uri)) { yield postViewToPlaceholderThread(post) } + for (let post of findAllPostsInQuoteQueryData(queryClient, uri)) { + yield postViewToPlaceholderThread(post) + } for (let post of findAllPostsInSearchQueryData(queryClient, uri)) { yield postViewToPlaceholderThread(post) } |