-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Mattermost Build <[email protected]> (cherry picked from commit 780f623) Co-authored-by: Daniel Espino García <[email protected]>
- Loading branch information
1 parent
28cc827
commit 590f74e
Showing
4 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/node_modules/@gorhom/bottom-sheet/src/hooks/useBottomSheetTimingConfigs.ts b/node_modules/@gorhom/bottom-sheet/src/hooks/useBottomSheetTimingConfigs.ts | ||
index 9d2f61d..ac91e40 100644 | ||
--- a/node_modules/@gorhom/bottom-sheet/src/hooks/useBottomSheetTimingConfigs.ts | ||
+++ b/node_modules/@gorhom/bottom-sheet/src/hooks/useBottomSheetTimingConfigs.ts | ||
@@ -1,5 +1,5 @@ | ||
import { useMemo } from 'react'; | ||
-import type { WithTimingConfig } from 'react-native-reanimated'; | ||
+import { ReduceMotion, type WithTimingConfig } from 'react-native-reanimated'; | ||
import { ANIMATION_DURATION, ANIMATION_EASING } from '../constants'; | ||
|
||
/** | ||
@@ -14,6 +14,7 @@ export const useBottomSheetTimingConfigs = (configs: WithTimingConfig) => { | ||
const _configs: WithTimingConfig = { | ||
easing: configs.easing || ANIMATION_EASING, | ||
duration: configs.duration || ANIMATION_DURATION, | ||
+ reduceMotion: ReduceMotion.Never, | ||
}; | ||
|
||
return _configs; | ||
diff --git a/node_modules/@gorhom/bottom-sheet/src/utilities/animate.ts b/node_modules/@gorhom/bottom-sheet/src/utilities/animate.ts | ||
index 0ce4c9a..c01a069 100644 | ||
--- a/node_modules/@gorhom/bottom-sheet/src/utilities/animate.ts | ||
+++ b/node_modules/@gorhom/bottom-sheet/src/utilities/animate.ts | ||
@@ -4,6 +4,7 @@ import { | ||
withTiming, | ||
withSpring, | ||
AnimationCallback, | ||
+ ReduceMotion, | ||
} from 'react-native-reanimated'; | ||
import { ANIMATION_CONFIGS, ANIMATION_METHOD } from '../constants'; | ||
|
||
@@ -26,6 +27,8 @@ export const animate = ({ | ||
configs = ANIMATION_CONFIGS; | ||
} | ||
|
||
+ configs = {...configs, reduceMotion: ReduceMotion.Never}; | ||
+ | ||
// detect animation type | ||
const type = | ||
'duration' in configs || 'easing' in configs |