Remove post thread (#1920)

* Delete post-thread model

* Remove post-thread-item

* Remove unused types
This commit is contained in:
Eric Bailey 2023-11-15 19:18:45 -06:00 committed by GitHub
parent 6616b2bff0
commit d8b26edb56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 485 deletions

View file

@ -4,8 +4,8 @@ import {
AppBskyFeedGetPostThread,
} from '@atproto/api'
import {useQuery} from '@tanstack/react-query'
import {useSession} from '../session'
import {ThreadViewPreference} from '../models/ui/preferences'
import {useSession} from '#/state/session'
import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types'
export const RQKEY = (uri: string) => ['post-thread', uri]
type ThreadViewNode = AppBskyFeedGetPostThread.OutputSchema['thread']
@ -72,7 +72,7 @@ export function usePostThreadQuery(uri: string | undefined) {
export function sortThread(
node: ThreadNode,
opts: ThreadViewPreference,
opts: UsePreferencesQueryResponse['threadViewPrefs'],
): ThreadNode {
if (node.type !== 'post') {
return node