about summary refs log tree commit diff
path: root/patches
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-05-16 12:01:26 +0100
committerGitHub <noreply@github.com>2024-05-16 12:01:26 +0100
commitaded49f65b09fc06ad07831df527da017e75bcec (patch)
tree4518d41c8b5302023bf9fc1e46883b5c227150e4 /patches
parent3674c8abcec927a5293a966027f54fe8a0b7c2fd (diff)
downloadvoidsky-aded49f65b09fc06ad07831df527da017e75bcec.tar.zst
Implement prefersReducedMotion on native (#4039)
* implement prefersReducedMotion on native

* just take the function from the reanimated source

* use patch-package to export internal function
Diffstat (limited to 'patches')
-rw-r--r--patches/react-native-reanimated+3.6.0.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/react-native-reanimated+3.6.0.patch b/patches/react-native-reanimated+3.6.0.patch
new file mode 100644
index 000000000..093d83e41
--- /dev/null
+++ b/patches/react-native-reanimated+3.6.0.patch
@@ -0,0 +1,30 @@
+diff --git a/node_modules/react-native-reanimated/lib/module/reanimated2/index.js b/node_modules/react-native-reanimated/lib/module/reanimated2/index.js
+index 91e49f4..c10d3fc 100644
+--- a/node_modules/react-native-reanimated/lib/module/reanimated2/index.js
++++ b/node_modules/react-native-reanimated/lib/module/reanimated2/index.js
+@@ -45,4 +45,5 @@ export { getUseOfValueInStyleWarning } from './pluginUtils';
+ export { withReanimatedTimer, advanceAnimationByTime, advanceAnimationByFrame, setUpTests, getAnimatedStyle } from './jestUtils';
+ export { LayoutAnimationConfig } from './component/LayoutAnimationConfig';
+ export { startMapper, stopMapper } from './mappers';
++export { isReducedMotion } from './PlatformChecker';
+ //# sourceMappingURL=index.js.map
+\ No newline at end of file
+diff --git a/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts b/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts
+index 96bd913..ad63a09 100644
+--- a/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts
++++ b/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts
+@@ -33,3 +33,4 @@ export type { Adaptable, AdaptTransforms, AnimateProps, AnimatedProps, AnimatedT
+ export type { AnimatedScrollViewProps } from './component/ScrollView';
+ export type { FlatListPropsWithLayout } from './component/FlatList';
+ export { startMapper, stopMapper } from './mappers';
++export { isReducedMotion } from './PlatformChecker';
+diff --git a/node_modules/react-native-reanimated/src/reanimated2/index.ts b/node_modules/react-native-reanimated/src/reanimated2/index.ts
+index 096dc05..38fc01d 100644
+--- a/node_modules/react-native-reanimated/src/reanimated2/index.ts
++++ b/node_modules/react-native-reanimated/src/reanimated2/index.ts
+@@ -271,3 +271,4 @@ export type {
+ export type { AnimatedScrollViewProps } from './component/ScrollView';
+ export type { FlatListPropsWithLayout } from './component/FlatList';
+ export { startMapper, stopMapper } from './mappers';
++export { isReducedMotion } from './PlatformChecker';
+\ No newline at end of file