Browse Source

Switch to tab only if it is not the currently selected tab

Guy Carmeli 7 years ago
parent
commit
ab44102f0c

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

343
     }
343
     }
344
 
344
 
345
     public void selectBottomTabByTabIndex(Integer index) {
345
     public void selectBottomTabByTabIndex(Integer index) {
346
-        bottomTabs.setCurrentItem(index);
346
+        if (bottomTabs.getCurrentItem() != index) {
347
+            bottomTabs.setCurrentItem(index);
348
+        }
347
     }
349
     }
348
 
350
 
349
     public void selectBottomTabByNavigatorId(final String navigatorId) {
351
     public void selectBottomTabByNavigatorId(final String navigatorId) {