diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 21 | ||||
-rw-r--r-- | src/view/com/util/forms/PostDropdownBtn.tsx | 17 | ||||
-rw-r--r-- | src/view/shell/index.tsx | 2 |
3 files changed, 4 insertions, 36 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 4827aef51..5ee60e4ea 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -30,11 +30,6 @@ import {useSession} from 'state/session' import {PostThreadFollowBtn} from 'view/com/post-thread/PostThreadFollowBtn' import {atoms as a} from '#/alf' import {RichText} from '#/components/RichText' -import { - isAvailable as isNativeTranslationAvailable, - isLanguageSupported, - NativeTranslationModule, -} from '../../../../modules/expo-bluesky-translate' import {ContentHider} from '../../../components/moderation/ContentHider' import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe' import {PostAlerts} from '../../../components/moderation/PostAlerts' @@ -344,7 +339,6 @@ let PostThreadItemLoaded = ({ </ContentHider> <ExpandedPostDetails post={post} - record={record} translatorUrl={translatorUrl} needsTranslation={needsTranslation} /> @@ -653,12 +647,10 @@ function PostOuterWrapper({ function ExpandedPostDetails({ post, - record, needsTranslation, translatorUrl, }: { post: AppBskyFeedDefs.PostView - record?: AppBskyFeedPost.Record needsTranslation: boolean translatorUrl: string }) { @@ -666,18 +658,9 @@ function ExpandedPostDetails({ const {_} = useLingui() const openLink = useOpenLink() - const text = record?.text || '' - const onTranslatePress = React.useCallback(() => { - if ( - isNativeTranslationAvailable && - isLanguageSupported(record?.langs?.at(0)) - ) { - NativeTranslationModule.presentAsync(text) - } else { - openLink(translatorUrl) - } - }, [openLink, text, translatorUrl, record]) + openLink(translatorUrl) + }, [openLink, translatorUrl]) return ( <View style={[s.flexRow, s.mt2, s.mb10]}> diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index 945cf5e59..b6873ff8a 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -57,11 +57,6 @@ import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/War import * as Menu from '#/components/Menu' import * as Prompt from '#/components/Prompt' import {ReportDialog, useReportDialogControl} from '#/components/ReportDialog' -import { - isAvailable as isNativeTranslationAvailable, - isLanguageSupported, - NativeTranslationModule, -} from '../../../../../modules/expo-bluesky-translate' import {EventStopper} from '../EventStopper' import * as Toast from '../Toast' @@ -188,16 +183,8 @@ let PostDropdownBtn = ({ }, [_, richText]) const onPressTranslate = React.useCallback(() => { - if ( - isNativeTranslationAvailable && - isLanguageSupported(record?.langs?.at(0)) - ) { - const text = richTextToString(richText, true) - NativeTranslationModule.presentAsync(text) - } else { - openLink(translatorUrl) - } - }, [openLink, record?.langs, richText, translatorUrl]) + openLink(translatorUrl) + }, [openLink, translatorUrl]) const onHidePost = React.useCallback(() => { hidePost({uri: postUri}) diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index 317ac0bde..7d080e57b 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -33,7 +33,6 @@ import {ErrorBoundary} from 'view/com/util/ErrorBoundary' import {MutedWordsDialog} from '#/components/dialogs/MutedWords' import {SigninDialog} from '#/components/dialogs/Signin' import {Outlet as PortalOutlet} from '#/components/Portal' -import {NativeTranslationView} from '../../../modules/expo-bluesky-translate' import {RoutesContainer, TabsNavigator} from '../../Navigation' import {Composer} from './Composer' import {DrawerContent} from './Drawer' @@ -94,7 +93,6 @@ function ShellInner() { </Drawer> </ErrorBoundary> </Animated.View> - <NativeTranslationView /> <Composer winHeight={winDim.height} /> <ModalsContainer /> <MutedWordsDialog /> |