Pārlūkot izejas kodu

Toggle bottom tabs after popToRoot

Guy Carmeli 8 gadus atpakaļ
vecāks
revīzija
31d7ed4eb6

+ 7
- 1
android/app/src/main/java/com/reactnativenavigation/activities/BottomTabActivity.java Parādīt failu

@@ -150,7 +150,13 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
150 150
         for (ScreenStack stack : mScreenStacks) {
151 151
             if (stack.peek().navigatorId.equals(navigatorId)) {
152 152
                 Screen popped = stack.popToRoot();
153
-                StyleHelper.updateStyles(mToolbar, getCurrentScreen());
153
+                Screen currentScreen = getCurrentScreen();
154
+                StyleHelper.updateStyles(mToolbar, currentScreen);
155
+
156
+                if (shouldToggleTabs(currentScreen)) {
157
+                    toggleTabs(currentScreen.bottomTabsHidden, false);
158
+                }
159
+
154 160
                 return popped;
155 161
             }
156 162
         }