Kaynağa Gözat

Discard tabSelectedEvent if tab was already selected

Guy Carmeli 8 yıl önce
ebeveyn
işleme
27b18c3a08

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java Dosyayı Görüntüle

@@ -268,6 +268,10 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
268 268
 
269 269
     @Override
270 270
     public boolean onTabSelected(int position, boolean wasSelected) {
271
+        if (wasSelected) {
272
+            return false;
273
+        }
274
+        
271 275
         hideCurrentStack();
272 276
         showNewStack(position);
273 277
         EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));