Skip to content

Commit

Permalink
Make blocksGesture symmetric on native iOS (#3322)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki authored Jan 18, 2025
1 parent 9cef24e commit a358ab0
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions apple/RNGestureHandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -461,16 +461,23 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
if ([_handlersToWaitFor count]) {
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
if (handler != nil) {
for (NSNumber *handlerTag in _handlersToWaitFor) {
if ([handler.tag isEqual:handlerTag]) {
return YES;
}
}
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
if (handler == nil) {
return NO;
}

for (NSNumber *handlerTag in _handlersToWaitFor) {
if ([handler.tag isEqual:handlerTag]) {
return YES;
}
}

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

return NO;
}

Expand Down

0 comments on commit a358ab0

Please sign in to comment.