Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -11,7 +11,6 @@ import {useIntentHandler} from '#/lib/hooks/useIntentHandler'
|
||||
import {useNotificationsHandler} from '#/lib/hooks/useNotificationHandler'
|
||||
import {useNotificationsRegistration} from '#/lib/notifications/notifications'
|
||||
import {isStateAtTabRoot} from '#/lib/routes/helpers'
|
||||
import {isAndroid, isIOS} from '#/platform/detection'
|
||||
import {useDialogFullyExpandedCountContext} from '#/state/dialogs'
|
||||
import {useSession} from '#/state/session'
|
||||
import {
|
||||
@@ -43,6 +42,7 @@ import {Outlet as PortalOutlet} from '#/components/Portal'
|
||||
import {useAgeAssurance} from '#/ageAssurance'
|
||||
import {NoAccessScreen} from '#/ageAssurance/components/NoAccessScreen'
|
||||
import {RedirectOverlay} from '#/ageAssurance/components/RedirectOverlay'
|
||||
import {IS_ANDROID, IS_IOS} from '#/env'
|
||||
import {RoutesContainer, TabsNavigator} from '#/Navigation'
|
||||
import {BottomSheetOutlet} from '../../../modules/bottom-sheet'
|
||||
import {updateActiveViewAsync} from '../../../modules/expo-bluesky-swiss-army/src/VisibilityView'
|
||||
@@ -60,7 +60,7 @@ function ShellInner() {
|
||||
useNotificationsHandler()
|
||||
|
||||
useEffect(() => {
|
||||
if (isAndroid) {
|
||||
if (IS_ANDROID) {
|
||||
const listener = BackHandler.addEventListener('hardwareBackPress', () => {
|
||||
return closeAnyActiveElement()
|
||||
})
|
||||
@@ -80,7 +80,7 @@ function ShellInner() {
|
||||
const navigation = useNavigation()
|
||||
const dedupe = useDedupe(1000)
|
||||
useEffect(() => {
|
||||
if (!isAndroid) return
|
||||
if (!IS_ANDROID) return
|
||||
const onFocusOrBlur = () => {
|
||||
setTimeout(() => {
|
||||
dedupe(updateActiveViewAsync)
|
||||
@@ -190,11 +190,13 @@ function DrawerLayout({children}: {children: React.ReactNode}) {
|
||||
swipeEdgeWidth={winDim.width}
|
||||
swipeMinVelocity={100}
|
||||
swipeMinDistance={10}
|
||||
drawerType={isIOS ? 'slide' : 'front'}
|
||||
drawerType={IS_IOS ? 'slide' : 'front'}
|
||||
overlayStyle={{
|
||||
backgroundColor: select(t.name, {
|
||||
light: 'rgba(0, 57, 117, 0.1)',
|
||||
dark: isAndroid ? 'rgba(16, 133, 254, 0.1)' : 'rgba(1, 82, 168, 0.1)',
|
||||
dark: IS_ANDROID
|
||||
? 'rgba(16, 133, 254, 0.1)'
|
||||
: 'rgba(1, 82, 168, 0.1)',
|
||||
dim: 'rgba(10, 13, 16, 0.8)',
|
||||
}),
|
||||
}}>
|
||||
@@ -220,7 +222,7 @@ export function Shell() {
|
||||
<SystemBars
|
||||
style={{
|
||||
statusBar:
|
||||
t.name !== 'light' || (isIOS && fullyExpandedCount > 0)
|
||||
t.name !== 'light' || (IS_IOS && fullyExpandedCount > 0)
|
||||
? 'light'
|
||||
: 'dark',
|
||||
navigationBar: t.name !== 'light' ? 'light' : 'dark',
|
||||
|
||||
Reference in New Issue
Block a user