Browse Source

Select bottom bottom tab by navigatorId only if it's not selected

This is potentially a breaking change as calling navigator.switchToTab()
won't do anything now if the current tab is already selected.
Guy Carmeli 7 years ago
parent
commit
9c95c60eab

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java View File

@@ -352,7 +352,7 @@ public class BottomTabsLayout extends BaseLayout implements AHBottomNavigation.O
352 352
         performOnStack(navigatorId, new Task<ScreenStack>() {
353 353
             @Override
354 354
             public void run(ScreenStack param) {
355
-                bottomTabs.setCurrentItem(getScreenStackIndex(navigatorId));
355
+                selectBottomTabByTabIndex(getScreenStackIndex(navigatorId));
356 356
             }
357 357
         });
358 358
     }