Clean up getPostThreadV2 settings/params in prep for future work (#9179)
* Deprecate prioritizeFollowedUsers * Bump API package
This commit is contained in:
@@ -49,7 +49,6 @@ export function usePostThread({anchor}: {anchor?: string}) {
|
||||
setSort: baseSetSort,
|
||||
view,
|
||||
setView: baseSetView,
|
||||
prioritizeFollowedUsers,
|
||||
} = useThreadPreferences()
|
||||
const below = useMemo(() => {
|
||||
return view === 'linear'
|
||||
@@ -63,11 +62,9 @@ export function usePostThread({anchor}: {anchor?: string}) {
|
||||
anchor,
|
||||
sort,
|
||||
view,
|
||||
prioritizeFollowedUsers,
|
||||
})
|
||||
const postThreadOtherQueryKey = createPostThreadOtherQueryKey({
|
||||
anchor,
|
||||
prioritizeFollowedUsers,
|
||||
})
|
||||
|
||||
const query = useQuery<UsePostThreadQueryResult>({
|
||||
@@ -79,7 +76,6 @@ export function usePostThread({anchor}: {anchor?: string}) {
|
||||
branchingFactor: view === 'linear' ? LINEAR_VIEW_BF : TREE_VIEW_BF,
|
||||
below,
|
||||
sort: sort,
|
||||
prioritizeFollowedUsers: prioritizeFollowedUsers,
|
||||
})
|
||||
|
||||
/*
|
||||
@@ -167,7 +163,6 @@ export function usePostThread({anchor}: {anchor?: string}) {
|
||||
async queryFn() {
|
||||
const {data} = await agent.app.bsky.unspecced.getPostThreadOtherV2({
|
||||
anchor: anchor!,
|
||||
prioritizeFollowedUsers,
|
||||
})
|
||||
return data
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ export const createPostThreadOtherQueryKey = (
|
||||
|
||||
export type PostThreadParams = Pick<
|
||||
AppBskyUnspeccedGetPostThreadV2.QueryParams,
|
||||
'sort' | 'prioritizeFollowedUsers'
|
||||
'sort'
|
||||
> & {
|
||||
anchor?: string
|
||||
view: 'tree' | 'linear'
|
||||
|
||||
Reference in New Issue
Block a user