From 46e12c6d34897fab77e039b1acb13b88a4b97a80 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 11 Jun 2024 11:30:38 -0700 Subject: Improve thread loading (#4402) * Increase the number of posts loaded when a self-thread is present * Increase depth to 10, detect cutoffs on self-threads and show continue link * Stacky the avis --- src/view/com/post-thread/PostThreadLoadMore.tsx | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/view/com/post-thread/PostThreadLoadMore.tsx (limited to 'src/view/com/post-thread/PostThreadLoadMore.tsx') diff --git a/src/view/com/post-thread/PostThreadLoadMore.tsx b/src/view/com/post-thread/PostThreadLoadMore.tsx new file mode 100644 index 000000000..780ea7728 --- /dev/null +++ b/src/view/com/post-thread/PostThreadLoadMore.tsx @@ -0,0 +1,57 @@ +import * as React from 'react' +import {View} from 'react-native' +import {AppBskyFeedDefs, AtUri} from '@atproto/api' +import {Trans} from '@lingui/macro' + +import {makeProfileLink} from '#/lib/routes/links' +import {atoms as a, useTheme} from '#/alf' +import {Text} from '#/components/Typography' +import {Link} from '../util/Link' +import {UserAvatar} from '../util/UserAvatar' + +export function PostThreadLoadMore({post}: {post: AppBskyFeedDefs.PostView}) { + const t = useTheme() + + const postHref = React.useMemo(() => { + const urip = new AtUri(post.uri) + return makeProfileLink(post.author, 'post', urip.rkey) + }, [post.uri, post.author]) + + return ( + + + + + + + + + + + + Continue thread... + + + + ) +} -- cgit 1.4.1