Skip to content

Commit

Permalink
fix: bottom sheet not appearing for users that have reduced motion tu…
Browse files Browse the repository at this point in the history
…rned on (#1743)(by @fobos531)
  • Loading branch information
fobos531 authored Feb 26, 2024
1 parent 8b62dca commit 9b4ef4d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utilities/animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
withTiming,
withSpring,
AnimationCallback,
ReduceMotion,
} from 'react-native-reanimated';
import { ANIMATION_CONFIGS, ANIMATION_METHOD } from '../constants';

Expand All @@ -26,6 +27,11 @@ export const animate = ({
configs = ANIMATION_CONFIGS;
}

// Users might have an accessibililty setting to reduce motion turned on.
// This prevents the animation from running when presenting the sheet, which results in
// the bottom sheet not even appearing so we need to override it to ensure the animation runs.
configs.reduceMotion = ReduceMotion.Never;

// detect animation type
const type =
'duration' in configs || 'easing' in configs
Expand Down

0 comments on commit 9b4ef4d

Please sign in to comment.