Browse Source

Discard tabSelectedEvent if tab was already selected

Guy Carmeli 8 years ago
parent
commit
27b18c3a08

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

268
 
268
 
269
     @Override
269
     @Override
270
     public boolean onTabSelected(int position, boolean wasSelected) {
270
     public boolean onTabSelected(int position, boolean wasSelected) {
271
+        if (wasSelected) {
272
+            return false;
273
+        }
274
+        
271
         hideCurrentStack();
275
         hideCurrentStack();
272
         showNewStack(position);
276
         showNewStack(position);
273
         EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
277
         EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));