Files
iNaturalistReactNative/patches/react-native-modal+14.0.0-rc.1.patch
Johannes Klein 6e696cb524 Update to react-native 0.77 (#3026)
* Upgrade helper changes JS side

* Upgrade helper Android

* Upgrade helper iOS side

* Update project.pbxproj

* Create react-native-modal+14.0.0-rc.1.patch

* BackHandler.removeEventListener is deprecated

* Update react-native-modal

* Update .flowconfig

* Update package-lock.json

* Update Podfile.lock

* Update Podfile.lock from main

* Replace toBeVisible with toBeOnTheScreen

This is not recommended by react-navigation, because even though toBeOnTheScreen makes sure the components are in the tree it does not mean they are visible to the user. For example, in terms of navigation a previous screen is still i the tree but not visible to the user in the app.
I spent around a day trying to figure out why the isVisible check stopped working, and still have no clear answer.
Testing in the actual app shows that all of those flows are still working as expected, so it is a test-environment-only problem.
My suggestion would be to re-visit this problem after we have updated RN to latest, and testing related libraries to latest versions.
2025-08-01 12:11:13 +02:00

20 lines
1.0 KiB
Diff

diff --git a/node_modules/react-native-modal/dist/modal.js b/node_modules/react-native-modal/dist/modal.js
index 74edee4..042e1db 100644
--- a/node_modules/react-native-modal/dist/modal.js
+++ b/node_modules/react-native-modal/dist/modal.js
@@ -515,8 +515,13 @@ export class ReactNativeModal extends React.Component {
if (this.state.isSwipeable) {
panHandlers = { ...this.panResponder.panHandlers };
if (useNativeDriver) {
+ const translateTransform = this.state.pan.getTranslateTransform();
panPosition = {
- transform: this.state.pan.getTranslateTransform(),
+ transform: translateTransform.map(transform => {
+ const key = Object.keys(transform)[0];
+ const value = transform[key];
+ return { [key]: typeof value === 'object' && value !== null && '_value' in value ? value._value : value };
+ }),
};
}
else {