From c129108b786a3389181c401b0bdfe1a3de528ebb Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 4 Sep 2025 19:36:23 -0500 Subject: 108 fixes (#8977) * Translation comment * Fix error handling in starter pack generation * Allow access to DM settings for age restricted users * Leave post stat unit formatting up to translators --- src/screens/PostThread/components/ThreadItemAnchor.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/screens/PostThread/components/ThreadItemAnchor.tsx') diff --git a/src/screens/PostThread/components/ThreadItemAnchor.tsx b/src/screens/PostThread/components/ThreadItemAnchor.tsx index 08dd272f7..66ef96200 100644 --- a/src/screens/PostThread/components/ThreadItemAnchor.tsx +++ b/src/screens/PostThread/components/ThreadItemAnchor.tsx @@ -52,7 +52,7 @@ import {PostAlerts} from '#/components/moderation/PostAlerts' import {type AppModerationCause} from '#/components/Pills' import {Embed, PostEmbedViewContext} from '#/components/Post/Embed' import {PostControls} from '#/components/PostControls' -import {formatPostStatCount} from '#/components/PostControls/util' +import {useFormatPostStatCount} from '#/components/PostControls/util' import {ProfileHoverCard} from '#/components/ProfileHoverCard' import * as Prompt from '#/components/Prompt' import {RichText} from '#/components/RichText' @@ -176,11 +176,12 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ postSource?: PostSource }) { const t = useTheme() - const {_, i18n} = useLingui() + const {_} = useLingui() const {openComposer} = useOpenComposer() const {currentAccount, hasSession} = useSession() const {gtTablet} = useBreakpoints() const feedFeedback = useFeedFeedback(postSource?.feedSourceInfo, hasSession) + const formatPostStatCount = useFormatPostStatCount() const post = postShadow const record = item.value.post.record @@ -439,7 +440,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ testID="repostCount-expanded" style={[a.text_md, t.atoms.text_contrast_medium]}> - {formatPostStatCount(i18n, post.repostCount)} + {formatPostStatCount(post.repostCount)} {' '} - {formatPostStatCount(i18n, post.quoteCount)} + {formatPostStatCount(post.quoteCount)} {' '} - {formatPostStatCount(i18n, post.likeCount)} + {formatPostStatCount(post.likeCount)} {' '} @@ -485,7 +486,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ testID="bookmarkCount-expanded" style={[a.text_md, t.atoms.text_contrast_medium]}> - {formatPostStatCount(i18n, post.bookmarkCount)} + {formatPostStatCount(post.bookmarkCount)} {' '}