From 5ec04c70825a26f59d54405eae6926e5005ac792 Mon Sep 17 00:00:00 2001 From: Hailey Date: Sun, 4 Aug 2024 19:40:06 -0700 Subject: [PATCH] update default schema --- src/platform/detection.ts | 3 --- src/state/persisted/schema.ts | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/platform/detection.ts b/src/platform/detection.ts index 0c0360a82a..f00df0ee4e 100644 --- a/src/platform/detection.ts +++ b/src/platform/detection.ts @@ -1,5 +1,4 @@ import {Platform} from 'react-native' -import {isReducedMotion} from 'react-native-reanimated' import {getLocales} from 'expo-localization' import {fixLegacyLanguageCode} from '#/locale/helpers' @@ -21,5 +20,3 @@ export const deviceLocales = dedupArray( .map?.(locale => fixLegacyLanguageCode(locale.languageCode)) .filter(code => typeof code === 'string'), ) as string[] - -export const prefersReducedMotion = isReducedMotion() diff --git a/src/state/persisted/schema.ts b/src/state/persisted/schema.ts index 88fc370a6f..399a7e7932 100644 --- a/src/state/persisted/schema.ts +++ b/src/state/persisted/schema.ts @@ -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, }