From 20b2f1475ca4e2e9c660fb4fb472fe4fd6fb687b Mon Sep 17 00:00:00 2001 From: surfdude29 <149612116+surfdude29@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:14:21 +0000 Subject: [PATCH 1/3] Suggest wording tweak in StepAlgoFeeds/index.tsx (#2653) * Suggest wording tweak in StepAlgoFeeds/index.tsx * Update src/screens/Onboarding/StepAlgoFeeds/index.tsx --------- Co-authored-by: Eric Bailey --- src/screens/Onboarding/StepAlgoFeeds/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/Onboarding/StepAlgoFeeds/index.tsx b/src/screens/Onboarding/StepAlgoFeeds/index.tsx index 4920c5ad7b..d576026e14 100644 --- a/src/screens/Onboarding/StepAlgoFeeds/index.tsx +++ b/src/screens/Onboarding/StepAlgoFeeds/index.tsx @@ -119,7 +119,7 @@ export function StepAlgoFeeds() { - Or you can try our "Discover" algorithm: + You can also try our "Discover" algorithm: From 4f2802856986e648052d5c5f04c6fcf50e0a731e Mon Sep 17 00:00:00 2001 From: surfdude29 <149612116+surfdude29@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:15:48 +0000 Subject: [PATCH 2/3] Fix typos and suggested punctuation tweak in StepSuggestedAccounts/index.tsx (#2649) * Fix typos in StepSuggestedAccounts/index.tsx * suggested wording tweak * on second thought, 'some' again is redundant --- src/screens/Onboarding/StepSuggestedAccounts/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screens/Onboarding/StepSuggestedAccounts/index.tsx b/src/screens/Onboarding/StepSuggestedAccounts/index.tsx index 723e53a98c..d3831791cc 100644 --- a/src/screens/Onboarding/StepSuggestedAccounts/index.tsx +++ b/src/screens/Onboarding/StepSuggestedAccounts/index.tsx @@ -129,13 +129,13 @@ export function StepSuggestedAccounts() { - <Trans>Here are some accounts for your to follow</Trans> + <Trans>Here are some accounts for you to follow</Trans> {state.interestsStepResults.selectedInterests.length ? ( Based on your interest in {interestsText} ) : ( - These are popular accounts you might like. + These are popular accounts you might like: )} @@ -171,7 +171,7 @@ export function StepSuggestedAccounts() { color="gradient_sky" size="large" label={_( - msg`Follow selected accounts and continue to then next step`, + msg`Follow selected accounts and continue to the next step`, )} onPress={handleContinue}> From 640ce5e47b6712b93d899fd0a71c008423c77af8 Mon Sep 17 00:00:00 2001 From: Hailey <153161762+haileyok@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:14:41 -0800 Subject: [PATCH 3/3] use in app browser for translations when enabled (#2663) --- src/view/com/post-thread/PostThreadItem.tsx | 17 ++++++++++++----- src/view/com/util/forms/PostDropdownBtn.tsx | 8 +++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index a27ee0a581..1cc2bb824a 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -40,6 +40,7 @@ import {useLingui} from '@lingui/react' import {useLanguagePrefs} from '#/state/preferences' import {useComposerControls} from '#/state/shell/composer' import {useModerationOpts} from '#/state/queries/preferences' +import {useOpenLink} from '#/state/preferences/in-app-browser' import {Shadow, usePostShadow, POST_TOMBSTONE} from '#/state/cache/post-shadow' import {ThreadPost} from '#/state/queries/post-thread' import {useSession} from '#/state/session' @@ -701,17 +702,23 @@ function ExpandedPostDetails({ }) { const pal = usePalette('default') const {_} = useLingui() + const openLink = useOpenLink() + const onTranslatePress = React.useCallback( + () => openLink(translatorUrl), + [openLink, translatorUrl], + ) return ( {niceDate(post.indexedAt)} {needsTranslation && ( <> · - - - Translate - - + + Translate + )} diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index 940f39057b..e56c88d2c9 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -1,5 +1,5 @@ import React, {memo} from 'react' -import {Linking, StyleProp, View, ViewStyle} from 'react-native' +import {StyleProp, View, ViewStyle} from 'react-native' import Clipboard from '@react-native-clipboard/clipboard' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import { @@ -24,6 +24,7 @@ import {usePostDeleteMutation} from '#/state/queries/post' import {useMutedThreads, useToggleThreadMute} from '#/state/muted-threads' import {useLanguagePrefs} from '#/state/preferences' import {useHiddenPosts, useHiddenPostsApi} from '#/state/preferences' +import {useOpenLink} from '#/state/preferences/in-app-browser' import {logger} from '#/logger' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -61,6 +62,7 @@ let PostDropdownBtn = ({ const postDeleteMutation = usePostDeleteMutation() const hiddenPosts = useHiddenPosts() const {hidePost} = useHiddenPostsApi() + const openLink = useOpenLink() const rootUri = record.reply?.root?.uri || postUri const isThreadMuted = mutedThreads.includes(rootUri) @@ -111,8 +113,8 @@ let PostDropdownBtn = ({ }, [_, richText]) const onOpenTranslate = React.useCallback(() => { - Linking.openURL(translatorUrl) - }, [translatorUrl]) + openLink(translatorUrl) + }, [openLink, translatorUrl]) const onHidePost = React.useCallback(() => { hidePost({uri: postUri})