Move /platform/detection vars into /env (#9707)

* Add platform vars to env

* Replace /platform/detection with /env
This commit is contained in:
Eric Bailey
2026-01-16 16:28:17 -06:00
committed by GitHub
parent bd510d8468
commit 0589bd7d9e
244 changed files with 789 additions and 789 deletions
+5 -5
View File
@@ -14,7 +14,6 @@ import {openCamera, openCropper, openPicker} from '#/lib/media/picker'
import {type PickerImage} from '#/lib/media/picker.shared'
import {isCancelledError} from '#/lib/strings/errors'
import {logger} from '#/logger'
import {isAndroid, isNative} from '#/platform/detection'
import {
type ComposerImage,
compressImage,
@@ -32,6 +31,7 @@ import {
import {StreamingLive_Stroke2_Corner0_Rounded as LibraryIcon} from '#/components/icons/StreamingLive'
import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash'
import * as Menu from '#/components/Menu'
import {IS_ANDROID, IS_NATIVE} from '#/env'
export function UserBanner({
type,
@@ -75,7 +75,7 @@ export function UserBanner({
}
try {
if (isNative) {
if (IS_NATIVE) {
onSelectNewBanner?.(
await compressIfNeeded(
await openCropper({
@@ -153,7 +153,7 @@ export function UserBanner({
</Menu.Trigger>
<Menu.Outer showCancel>
<Menu.Group>
{isNative && (
{IS_NATIVE && (
<Menu.Item
testID="changeBannerCameraBtn"
label={_(msg`Upload from Camera`)}
@@ -170,7 +170,7 @@ export function UserBanner({
label={_(msg`Upload from Library`)}
onPress={onOpenLibrary}>
<Menu.ItemText>
{isNative ? (
{IS_NATIVE ? (
<Trans>Upload from Library</Trans>
) : (
<Trans>Upload from Files</Trans>
@@ -207,7 +207,7 @@ export function UserBanner({
/>
</>
) : banner &&
!((moderation?.blur && isAndroid) /* android crashes with blur */) ? (
!((moderation?.blur && IS_ANDROID) /* android crashes with blur */) ? (
<Image
testID="userBannerImage"
style={[styles.bannerImage, t.atoms.bg_contrast_25]}