Remove post thread (#1920)
* Delete post-thread model * Remove post-thread-item * Remove unused types
This commit is contained in:
parent
6616b2bff0
commit
d8b26edb56
4 changed files with 3 additions and 485 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue