diff options
author | Eric Bailey <git@esb.lol> | 2024-09-20 10:50:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-20 10:50:33 -0500 |
commit | fa6f6f9e473a0dd731ea95210fbd66e0b8c0c283 (patch) | |
tree | 1c5166f9b31d3b4967fcf8cd8cdb969d2efa92cb /src/platform | |
parent | cd88cbeab83169410fff3245505b53122dfe28aa (diff) | |
download | voidsky-fa6f6f9e473a0dd731ea95210fbd66e0b8c0c283.tar.zst |
Language fixes (#5384)
* Add some comments * Decouple language settings * Normalize on read/write * Refactor * Support device locale on app startup * Cleanup, port to web * Clean up comments * Comment * Try not to mutate * Protect util handling, update test * Dedupe array values
Diffstat (limited to 'src/platform')
-rw-r--r-- | src/platform/detection.ts | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/platform/detection.ts b/src/platform/detection.ts index c62ae71aa..dc30c2fd3 100644 --- a/src/platform/detection.ts +++ b/src/platform/detection.ts @@ -1,8 +1,4 @@ import {Platform} from 'react-native' -import {getLocales} from 'expo-localization' - -import {fixLegacyLanguageCode} from '#/locale/helpers' -import {dedupArray} from 'lib/functions' export const isIOS = Platform.OS === 'ios' export const isAndroid = Platform.OS === 'android' @@ -15,9 +11,3 @@ export const isMobileWeb = // @ts-ignore we know window exists -prf global.window.matchMedia(isMobileWebMediaQuery)?.matches export const isIPhoneWeb = isWeb && /iPhone/.test(navigator.userAgent) - -export const deviceLocales = dedupArray( - getLocales?.() - .map?.(locale => fixLegacyLanguageCode(locale.languageCode)) - .filter(code => typeof code === 'string'), -) as string[] |