From 44a5bcad1cc89b8246b51b77b74a11732c10fdd8 Mon Sep 17 00:00:00 2001 From: Tyler Williams Date: Tue, 14 Apr 2026 11:51:13 -0400 Subject: [PATCH] fix: bottom sheet not appearing with android reduce motion --- src/components/bottomSheet/BottomSheet.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index 4ff41422..d067e181 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -6,6 +6,7 @@ import React, { useEffect, useImperativeHandle, useMemo, + useState, } from 'react'; import { Dimensions, Platform, StyleSheet } from 'react-native'; import { State } from 'react-native-gesture-handler'; @@ -279,6 +280,13 @@ const BottomSheetComponent = forwardRef( ? userReduceMotionSetting : _providedOverrideReduceMotion === ReduceMotion.Always; }, [userReduceMotionSetting, _providedOverrideReduceMotion]); + + const [, _forceUpdate] = useState(0); + const handleReduceMotionMountFlush = useCallback(() => { + if (Platform.OS === 'android' && reduceMotion) { + _forceUpdate((prev: number) => prev + 1); + } + }, [reduceMotion]); //#endregion //#region state/dynamic variables @@ -977,7 +985,7 @@ const BottomSheetComponent = forwardRef( * if animate on mount is set to true, then we animate to the propose position, * else, we set the position with out animation. */ - if (animateOnMount) { + if (animateOnMount && !(Platform.OS === 'android' && reduceMotion)) { animateToPosition( proposedPosition, ANIMATION_SOURCE.MOUNT, @@ -987,6 +995,7 @@ const BottomSheetComponent = forwardRef( } else { setToPosition(proposedPosition); didAnimateOnMount.value = true; + runOnJS(handleReduceMotionMountFlush)(); } return; } @@ -1077,6 +1086,7 @@ const BottomSheetComponent = forwardRef( didAnimateOnMount, isInTemporaryPosition, isLayoutCalculated, + handleReduceMotionMountFlush, ] ); //#endregion