import {memo} from 'react' import {View} from 'react-native' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import { type PostThreadParams, type ThreadItem, } from '#/state/queries/usePostThread' import { LINEAR_AVI_WIDTH, REPLY_LINE_WIDTH, TREE_AVI_WIDTH, TREE_INDENT, } from '#/screens/PostThread/const' import {atoms as a, useTheme} from '#/alf' import {CirclePlus_Stroke2_Corner0_Rounded as CirclePlus} from '#/components/icons/CirclePlus' import {Link} from '#/components/Link' import {Text} from '#/components/Typography' export const ThreadItemReadMore = memo(function ThreadItemReadMore({ item, view, }: { item: Extract view: PostThreadParams['view'] }) { const t = useTheme() const {_} = useLingui() const isTreeView = view === 'tree' const indent = Math.max(0, item.depth - 1) const spacers = isTreeView ? Array.from(Array(indent)).map((_, n: number) => { const isSkipped = item.skippedIndentIndices.has(n) return ( ) }) : null return ( {spacers} {({hovered, pressed}) => { const interacted = hovered || pressed return ( <> Read{' '} ) }} ) })