Skip to content

Commit a6664db

Browse files
authored
Merge branch 'main' into @akwasniewski/android-unresponsive-pressable
2 parents 86af46a + ae25b49 commit a6664db

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

packages/react-native-gesture-handler/android/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ android {
151151
buildConfigField "int", "REACT_NATIVE_MINOR_VERSION", REACT_NATIVE_MINOR_VERSION.toString()
152152

153153
if (isNewArchitectureEnabled()) {
154-
var appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
155154
externalNativeBuild {
156155
cmake {
157156
cppFlags "-O2", "-frtti", "-fexceptions", "-Wall", "-Werror", "-std=c++20", "-DANDROID"
@@ -215,7 +214,7 @@ android {
215214
}
216215

217216
if (isGHExampleApp()) {
218-
tasks.withType(ExternalNativeBuildJsonTask) {
217+
tasks.withType(ExternalNativeBuildJsonTask).configureEach {
219218
compileTask ->
220219
compileTask.doLast {
221220
def rootDir = new File("${project.projectDir}/..")

packages/react-native-gesture-handler/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ export function useAnimatedGesture(
163163
runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, false);
164164
}
165165
} else if (isTouchEvent(event)) {
166-
if (!stateControllers[i]) {
166+
if (
167+
!stateControllers[i] ||
168+
stateControllers[i].handlerTag !== event.handlerTag
169+
) {
167170
stateControllers[i] = GestureStateManager.create(event.handlerTag);
168171
}
169172

packages/react-native-gesture-handler/src/handlers/gestures/gestureStateManager.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export interface GestureStateManagerType {
77
activate: () => void;
88
fail: () => void;
99
end: () => void;
10+
/** @internal */
11+
handlerTag: number;
1012
}
1113

1214
const warningMessage = tagMessage(
@@ -21,6 +23,8 @@ const setGestureState = Reanimated?.setGestureState;
2123
function create(handlerTag: number): GestureStateManagerType {
2224
'worklet';
2325
return {
26+
handlerTag,
27+
2428
begin: () => {
2529
'worklet';
2630
if (REANIMATED_AVAILABLE) {

packages/react-native-gesture-handler/src/handlers/gestures/gestureStateManager.web.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { GestureStateManagerType } from './gestureStateManager';
44
export const GestureStateManager = {
55
create(handlerTag: number): GestureStateManagerType {
66
return {
7+
handlerTag,
8+
79
begin: () => {
810
NodeManager.getHandler(handlerTag).begin();
911
},

0 commit comments

Comments
 (0)