* 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
This commit is contained in:
Eric Bailey
2025-09-04 19:36:23 -05:00
committed by GitHub
parent 0b480bdaf8
commit c129108b78
12 changed files with 89 additions and 67 deletions
+4 -7
View File
@@ -27,7 +27,7 @@ import {
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, flatten, useBreakpoints} from '#/alf'
import {Reply as Bubble} from '#/components/icons/Reply'
import {formatPostStatCount} from '#/components/PostControls/util'
import {useFormatPostStatCount} from '#/components/PostControls/util'
import {BookmarkButton} from './BookmarkButton'
import {
PostControlButton,
@@ -69,7 +69,7 @@ let PostControls = ({
viaRepost?: {uri: string; cid: string}
variant?: 'compact' | 'normal' | 'large'
}): React.ReactNode => {
const {_, i18n} = useLingui()
const {_} = useLingui()
const {openComposer} = useOpenComposer()
const {feedDescriptor} = useFeedFeedbackContext()
const [queueLike, queueUnlike] = usePostLikeMutationQueue(
@@ -95,6 +95,7 @@ let PostControls = ({
)
const replyDisabled = post.viewer?.replyDisabled
const {gtPhone} = useBreakpoints()
const formatPostStatCount = useFormatPostStatCount()
const [hasLikeIconBeenToggled, setHasLikeIconBeenToggled] = useState(false)
@@ -232,9 +233,7 @@ let PostControls = ({
<PostControlButtonIcon icon={Bubble} />
{typeof post.replyCount !== 'undefined' && post.replyCount > 0 && (
<PostControlButtonText>
{formatPostStatCount(i18n, post.replyCount, {
compact: variant === 'compact',
})}
{formatPostStatCount(post.replyCount)}
</PostControlButtonText>
)}
</PostControlButton>
@@ -247,7 +246,6 @@ let PostControls = ({
onQuote={onQuote}
big={big}
embeddingDisabled={Boolean(post.viewer?.embeddingDisabled)}
compactCount={variant === 'compact'}
/>
</View>
<View style={[a.flex_1, a.align_start]}>
@@ -288,7 +286,6 @@ let PostControls = ({
big={big}
isLiked={Boolean(post.viewer?.like)}
hasBeenToggled={hasLikeIconBeenToggled}
compactCount={variant === 'compact'}
/>
</PostControlButton>
</View>