Skip to content

Commit

Permalink
Make blocksHandlers symmetric on native iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Jan 10, 2025
1 parent c3ced78 commit f6d6104
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apple/RNGestureHandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
if ([_handlersToWaitFor count]) {
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
if (handler != nil) {
for (NSNumber *handlerTag in _handlersToWaitFor) {
if ([handler.tag isEqual:handlerTag]) {
Expand All @@ -471,6 +471,15 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
}
}
}

if (handler != nil) {
for (NSNumber *handlerTag in handler->_handlersThatShouldWait) {
if ([_tag isEqual:handlerTag]) {
return YES;
}
}
}

return NO;
}

Expand Down

0 comments on commit f6d6104

Please sign in to comment.