Skip to content

Commit

Permalink
More logic rework
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Oct 13, 2020
1 parent fdb55c1 commit fd5cd44
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions detox/ios/Detox/Actions/UIScrollView+DetoxActions.m
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,21 @@ static BOOL _DTXApplyScroll(UIScrollView* scrollView, CGPoint startPoint, CGPoin

prevOffset = scrollView.contentOffset;

if(didSomeScroll == NO && scrollView.bounces && scrollView._isBouncing)
if(scrollView.bounces && scrollView._isBouncing)
{
didFailTouches = YES;
if(didSomeScroll == NO)
{
didFailTouches = YES;
}
return NO;
}

if(didSomeScroll == NO && consecutiveTouchPointsWithSameContentOffset > consecutiveTouchPointsWithSameContentOffsetThreshold)
if(consecutiveTouchPointsWithSameContentOffset > consecutiveTouchPointsWithSameContentOffsetThreshold)
{
didFailTouches = YES;
if(didSomeScroll == NO)
{
didFailTouches = YES;
}
return NO;
}

Expand Down

0 comments on commit fd5cd44

Please sign in to comment.