Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into halo/base
Browse files Browse the repository at this point in the history
* origin/main:
  Rewrite the link detection (#3687)
  Remove unnecessary `.trimEnd()` and fix facet detection (#3672)
  Remove old old onboarding (#3674)
  Disable autoplay by default if prefers-reduced-motion (#3671)
  • Loading branch information
estrattonbailey committed Apr 24, 2024
2 parents e8d7893 + 8ec3d8c commit f373348
Show file tree
Hide file tree
Showing 16 changed files with 148 additions and 1,296 deletions.
1 change: 0 additions & 1 deletion src/lib/build-flags.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export const LOGIN_INCLUDE_DEV_SERVERS = true
export const PWI_ENABLED = true
export const NEW_ONBOARDING_ENABLED = true
6 changes: 6 additions & 0 deletions src/platform/detection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Platform} from 'react-native'
import {getLocales} from 'expo-localization'

import {dedupArray} from 'lib/functions'

export const isIOS = Platform.OS === 'ios'
Expand All @@ -18,3 +19,8 @@ export const deviceLocales = dedupArray(
.map?.(locale => locale.languageCode)
.filter(code => typeof code === 'string'),
) as string[]

export const prefersReducedMotion =
isWeb &&
// @ts-ignore we know window exists -prf
!global.window.matchMedia('(prefers-reduced-motion: no-preference)')?.matches
4 changes: 2 additions & 2 deletions src/state/persisted/schema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {z} from 'zod'

import {deviceLocales} from '#/platform/detection'
import {deviceLocales, prefersReducedMotion} from '#/platform/detection'

const externalEmbedOptions = ['show', 'hide'] as const

Expand Down Expand Up @@ -98,5 +98,5 @@ export const defaults: Schema = {
lastSelectedHomeFeed: undefined,
pdsAddressHistory: [],
disableHaptics: false,
disableAutoplay: false,
disableAutoplay: prefersReducedMotion,
}
51 changes: 0 additions & 51 deletions src/view/com/auth/Onboarding.tsx

This file was deleted.

211 changes: 0 additions & 211 deletions src/view/com/auth/onboarding/RecommendedFeeds.tsx

This file was deleted.

Loading

0 comments on commit f373348

Please sign in to comment.