diff options
author | Eric Bailey <git@esb.lol> | 2025-09-04 19:36:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-04 19:36:23 -0500 |
commit | c129108b786a3389181c401b0bdfe1a3de528ebb (patch) | |
tree | e075d0c41c8829d9c0b66464ba7cb86dd105be4e /src/screens | |
parent | 0b480bdaf862b0f93ed480589f81433bd6c93126 (diff) | |
download | voidsky-c129108b786a3389181c401b0bdfe1a3de528ebb.tar.zst |
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
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/Messages/ChatList.tsx | 13 | ||||
-rw-r--r-- | src/screens/Messages/Settings.tsx | 13 | ||||
-rw-r--r-- | src/screens/PostThread/components/ThreadItemAnchor.tsx | 13 |
3 files changed, 20 insertions, 19 deletions
diff --git a/src/screens/Messages/ChatList.tsx b/src/screens/Messages/ChatList.tsx index 345446464..cb8598e79 100644 --- a/src/screens/Messages/ChatList.tsx +++ b/src/screens/Messages/ChatList.tsx @@ -74,7 +74,18 @@ export function MessagesScreen(props: Props) { return ( <AgeRestrictedScreen screenTitle={_(msg`Chats`)} - infoText={aaCopy.chatsInfoText}> + infoText={aaCopy.chatsInfoText} + rightHeaderSlot={ + <Link + to="/messages/settings" + label={_(msg`Chat settings`)} + size="small" + color="secondary"> + <ButtonText> + <Trans>Chat settings</Trans> + </ButtonText> + </Link> + }> <MessagesScreenInner {...props} /> </AgeRestrictedScreen> ) diff --git a/src/screens/Messages/Settings.tsx b/src/screens/Messages/Settings.tsx index 6015c07cd..b4b84aafe 100644 --- a/src/screens/Messages/Settings.tsx +++ b/src/screens/Messages/Settings.tsx @@ -12,8 +12,6 @@ import {useSession} from '#/state/session' import * as Toast from '#/view/com/util/Toast' import {atoms as a} from '#/alf' import {Admonition} from '#/components/Admonition' -import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen' -import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy' import {Divider} from '#/components/Divider' import * as Toggle from '#/components/forms/Toggle' import * as Layout from '#/components/Layout' @@ -25,16 +23,7 @@ type AllowIncoming = 'all' | 'none' | 'following' type Props = NativeStackScreenProps<CommonNavigatorParams, 'MessagesSettings'> export function MessagesSettingsScreen(props: Props) { - const {_} = useLingui() - const aaCopy = useAgeAssuranceCopy() - - return ( - <AgeRestrictedScreen - screenTitle={_(msg`Chat Settings`)} - infoText={aaCopy.chatsInfoText}> - <MessagesSettingsScreenInner {...props} /> - </AgeRestrictedScreen> - ) + return <MessagesSettingsScreenInner {...props} /> } export function MessagesSettingsScreenInner({}: Props) { 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]}> <Text style={[a.text_md, a.font_bold, t.atoms.text]}> - {formatPostStatCount(i18n, post.repostCount)} + {formatPostStatCount(post.repostCount)} </Text>{' '} <Plural value={post.repostCount} @@ -457,7 +458,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ testID="quoteCount-expanded" style={[a.text_md, t.atoms.text_contrast_medium]}> <Text style={[a.text_md, a.font_bold, t.atoms.text]}> - {formatPostStatCount(i18n, post.quoteCount)} + {formatPostStatCount(post.quoteCount)} </Text>{' '} <Plural value={post.quoteCount} @@ -473,7 +474,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ testID="likeCount-expanded" style={[a.text_md, t.atoms.text_contrast_medium]}> <Text style={[a.text_md, a.font_bold, t.atoms.text]}> - {formatPostStatCount(i18n, post.likeCount)} + {formatPostStatCount(post.likeCount)} </Text>{' '} <Plural value={post.likeCount} one="like" other="likes" /> </Text> @@ -485,7 +486,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({ testID="bookmarkCount-expanded" style={[a.text_md, t.atoms.text_contrast_medium]}> <Text style={[a.text_md, a.font_bold, t.atoms.text]}> - {formatPostStatCount(i18n, post.bookmarkCount)} + {formatPostStatCount(post.bookmarkCount)} </Text>{' '} <Plural value={post.bookmarkCount} |