瀏覽代碼

Send bottomTabSelected event by tab index

relates to #2711
Guy Carmeli 6 年之前
父節點
當前提交
ddac4b88bd
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java 查看文件

@@ -491,7 +491,7 @@ public class BottomTabsLayout extends BaseLayout implements AHBottomNavigation.O
491 491
     }
492 492
 
493 493
     private void sendTabSelectedEventToJs(int selectedTabIndex, int unselectedTabIndex) {
494
-        String navigatorEventId = getCurrentScreenStack().peek().getNavigatorEventId();
494
+        String navigatorEventId = screenStacks[selectedTabIndex].peek().getNavigatorEventId();
495 495
         WritableMap data = createTabSelectedEventData(selectedTabIndex, unselectedTabIndex);
496 496
         NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("bottomTabSelected", navigatorEventId, data);
497 497