[SDK] Remove @atproto/api (#11386)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import {memo, useCallback, useMemo, useState} from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedThreadgate,
|
||||
AtUri,
|
||||
} from '@atproto/api'
|
||||
import {AtUri} from '@atproto/syntax'
|
||||
import {RichText as RichTextAPI} from '@bsky.app/sdk/richtext'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
|
||||
@@ -12,7 +8,6 @@ import {MAX_POST_LINES} from '#/lib/constants'
|
||||
import {useOpenComposer} from '#/lib/hooks/useOpenComposer'
|
||||
import {makeProfileLink} from '#/lib/routes/links'
|
||||
import {countLines} from '#/lib/strings/helpers'
|
||||
import {asSdkFacets} from '#/lib/strings/rich-text-helpers'
|
||||
import {
|
||||
POST_TOMBSTONE,
|
||||
type Shadow,
|
||||
@@ -51,6 +46,7 @@ import {RichText} from '#/components/RichText'
|
||||
import * as Skele from '#/components/Skeleton'
|
||||
import {SubtleHover} from '#/components/SubtleHover'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {type app} from '#/lexicons'
|
||||
|
||||
/**
|
||||
* Mimic the space in PostMeta
|
||||
@@ -69,7 +65,7 @@ export function ThreadItemTreePost({
|
||||
topBorder?: boolean
|
||||
}
|
||||
onPostSuccess?: (data: OnPostSuccessData) => void
|
||||
threadgateRecord?: AppBskyFeedThreadgate.Record
|
||||
threadgateRecord?: app.bsky.feed.threadgate.Main
|
||||
}) {
|
||||
const postShadow = usePostShadow(item.value.post)
|
||||
|
||||
@@ -252,13 +248,13 @@ const ThreadItemTreePostInner = memo(function ThreadItemTreePostInner({
|
||||
threadgateRecord,
|
||||
}: {
|
||||
item: Extract<ThreadItem, {type: 'threadPost'}>
|
||||
postShadow: Shadow<AppBskyFeedDefs.PostView>
|
||||
postShadow: Shadow<app.bsky.feed.defs.PostView>
|
||||
overrides?: {
|
||||
moderation?: boolean
|
||||
topBorder?: boolean
|
||||
}
|
||||
onPostSuccess?: (data: OnPostSuccessData) => void
|
||||
threadgateRecord?: AppBskyFeedThreadgate.Record
|
||||
threadgateRecord?: app.bsky.feed.threadgate.Main
|
||||
}): React.ReactNode {
|
||||
const {openComposer} = useOpenComposer()
|
||||
const {currentAccount} = useSession()
|
||||
@@ -272,7 +268,7 @@ const ThreadItemTreePostInner = memo(function ThreadItemTreePostInner({
|
||||
() =>
|
||||
new RichTextAPI({
|
||||
text: record.text,
|
||||
facets: asSdkFacets(record.facets),
|
||||
facets: record.facets,
|
||||
}),
|
||||
[record],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user