Skip to content

Commit ba6f04d

Browse files
author
Piotr Trocki
committed
Revert "fix(ios): rapid taps on the navigation tabs (#529)"
This reverts commit 27e8003.
1 parent 5fa3e12 commit ba6f04d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ios/ReactNativePageView.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,10 @@ - (void)setReactViewControllers:(NSInteger)index
184184
if (animated == YES) {
185185
self.animating = YES;
186186
}
187-
188-
//
189-
// If 'controller' is the current visible controller and the 'animated' flag is set to YES,
190-
// then 'setViewControllers' is called without invoking the completion handler. This can block the navigation from working.
191-
// So we need to check if that would be the case, and if so, we will not perform animation.
192-
//
193-
BOOL canAnimate = (controller != [[self.reactPageViewController viewControllers] firstObject] );
194187

195188
[self.reactPageViewController setViewControllers:@[controller]
196189
direction:direction
197-
animated:canAnimate?animated:NO
190+
animated:animated
198191
completion:^(BOOL finished) {
199192
__strong typeof(self) strongSelf = weakSelf;
200193
strongSelf.currentIndex = index;

0 commit comments

Comments
 (0)