Add PlatformInfo module (#4877)
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
import {AccessibilityInfo} from 'react-native'
|
||||
import {isReducedMotion} from 'react-native-reanimated'
|
||||
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {PlatformInfo} from '../../modules/expo-bluesky-swiss-army'
|
||||
|
||||
const Context = React.createContext({
|
||||
reduceMotionEnabled: false,
|
||||
@@ -15,7 +15,7 @@ export function useA11y() {
|
||||
|
||||
export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
const [reduceMotionEnabled, setReduceMotionEnabled] = React.useState(() =>
|
||||
isReducedMotion(),
|
||||
PlatformInfo.getIsReducedMotionEnabled(),
|
||||
)
|
||||
const [screenReaderEnabled, setScreenReaderEnabled] = React.useState(false)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {z} from 'zod'
|
||||
|
||||
import {deviceLocales, prefersReducedMotion} from '#/platform/detection'
|
||||
import {deviceLocales} from '#/platform/detection'
|
||||
import {PlatformInfo} from '../../../modules/expo-bluesky-swiss-army'
|
||||
|
||||
const externalEmbedOptions = ['show', 'hide'] as const
|
||||
|
||||
@@ -128,7 +129,7 @@ export const defaults: Schema = {
|
||||
lastSelectedHomeFeed: undefined,
|
||||
pdsAddressHistory: [],
|
||||
disableHaptics: false,
|
||||
disableAutoplay: prefersReducedMotion,
|
||||
disableAutoplay: PlatformInfo.getIsReducedMotionEnabled(),
|
||||
kawaii: false,
|
||||
hasCheckedForStarterPack: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user