Prefer full posts for post thread placeholder (#2943)
* Revert "Prefer post over quote when finding cached post (#2935)"
This reverts commit da62a77f05.
* Prefer full posts for post thread placeholder
* Clarify with a comment
This commit is contained in:
parent
fab6c286f4
commit
3a75855677
3 changed files with 33 additions and 67 deletions
|
|
@ -133,23 +133,6 @@ export function useNotificationFeedQuery(opts?: {enabled?: boolean}) {
|
|||
return query
|
||||
}
|
||||
|
||||
/**
|
||||
* This helper is used by the post-thread placeholder function to
|
||||
* find a post in the query-data cache
|
||||
*/
|
||||
export function findPostInQueryData(
|
||||
queryClient: QueryClient,
|
||||
uri: string,
|
||||
): AppBskyFeedDefs.PostView | undefined {
|
||||
const generator = findAllPostsInQueryData(queryClient, uri)
|
||||
const result = generator.next()
|
||||
if (result.done) {
|
||||
return undefined
|
||||
} else {
|
||||
return result.value
|
||||
}
|
||||
}
|
||||
|
||||
export function* findAllPostsInQueryData(
|
||||
queryClient: QueryClient,
|
||||
uri: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue