diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-05-30 14:35:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 12:35:38 +0100 |
commit | 13c08f56ba372c5c7f631c9771a215b82979eb20 (patch) | |
tree | 0dcd1857b042cf132dbc73c8184387a5cfb3d634 | |
parent | a72f55a11fcc45440314d30656c9d563181a0001 (diff) | |
download | voidsky-13c08f56ba372c5c7f631c9771a215b82979eb20.tar.zst |
Fix native translations on iOS 17.5.1 (#4282)
* enable translations on iOS 17.5.1 * add comment
-rw-r--r-- | modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx b/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx index daddfa028..290fabd30 100644 --- a/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx +++ b/modules/expo-bluesky-translate/src/ExpoBlueskyTranslateView.ios.tsx @@ -15,7 +15,10 @@ export function NativeTranslationView() { return <NativeView /> } -export const isAvailable = Number(Platform.Version) >= 17.4 +// can be something like "17.5.1", so just take the first two parts +const version = String(Platform.Version).split('.').slice(0, 2).join('.') + +export const isAvailable = Number(version) >= 17.4 // https://en.wikipedia.org/wiki/Translate_(Apple)#Languages const SUPPORTED_LANGUAGES = [ |