Add canonical OP thread numbering (#11184)

Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
This commit is contained in:
Eric Bailey
2026-08-05 12:20:43 -05:00
committed by GitHub
parent 8cb6c7babe
commit b79908ecea
8 changed files with 164 additions and 17 deletions
@@ -23,6 +23,10 @@ import {type OnPostSuccessData} from '#/state/shell/composer'
import {useMergedThreadgateHiddenReplies} from '#/state/threadgate-hidden-replies'
import {PostMeta} from '#/view/com/util/PostMeta'
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
import {
hasThreadItemPostNumber,
ThreadItemPostNumber,
} from '#/screens/PostThread/components/ThreadItemPostNumber'
import {
LINEAR_AVI_WIDTH,
OUTER_SPACE,
@@ -196,6 +200,7 @@ const ThreadItemPostInner = memo(function ThreadItemPostInner({
const post = item.value.post
const record = item.value.post.record
const postNumbering = item.value
const moderation = item.moderation
const richText = useMemo(
() =>
@@ -324,15 +329,28 @@ const ThreadItemPostInner = memo(function ThreadItemPostInner({
numberOfLines={limitLines ? MAX_POST_LINES : undefined}
authorHandle={post.author.handle}
shouldProxyLinks={true}
suffix={
!limitLines && hasThreadItemPostNumber(postNumbering) ? (
<ThreadItemPostNumber value={postNumbering} />
) : undefined
}
/>
{limitLines && (
<ShowMoreTextButton
style={[a.text_md]}
onPress={onPressShowMore}
/>
<View style={[a.flex_row, a.align_center, a.gap_xs]}>
<ShowMoreTextButton
style={[a.text_md]}
onPress={onPressShowMore}
/>
<ThreadItemPostNumber
inline={false}
value={postNumbering}
/>
</View>
)}
</View>
) : undefined}
) : (
<ThreadItemPostNumber inline={false} value={postNumbering} />
)}
<TranslatedPost hideTranslateLink post={post} />
{post.embed && (
<View