-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Missing infoMissing reproPlatform: AndroidThis issue is specific to AndroidThis issue is specific to Android
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-gesture-handler@2.21.2
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt b/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt
index ebcbb0d..b47423c 100644
--- a/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt
+++ b/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt
@@ -194,7 +194,7 @@ class GestureHandlerOrchestrator(
}
// Clear all awaiting handlers waiting for the current handler to fail
- for (otherHandler in awaitingHandlers.c) {
+ for (otherHandler in awaitingHandlers.asReversed()) {
if (shouldHandlerBeCancelledBy(otherHandler, handler)) {
otherHandler.isAwaiting = false
}
@@ -240,7 +240,7 @@ class GestureHandlerOrchestrator(
}
private fun cancelAll() {
- for (handler in awaitingHandlers.reversed()) {
+ for (handler in awaitingHandlers.asReversed()) {
handler.cancel()
}
// Copy handlers to "prepared handlers" array, because the list of active handlers can change
@@ -248,7 +248,7 @@ class GestureHandlerOrchestrator(
preparedHandlers.clear()
preparedHandlers.addAll(gestureHandlers)
- for (handler in gestureHandlers.reversed()) {
+ for (handler in gestureHandlers.asReversed()) {
handler.cancel()
}
}
This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
Missing infoMissing reproPlatform: AndroidThis issue is specific to AndroidThis issue is specific to Android