Browse Source

Fix missing back button in last component on setStackRoot (#5240)

Yogev Ben David 5 years ago
parent
commit
96661e3308

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java View File

198
                 @Override
198
                 @Override
199
                 public void onSuccess(String childId) {
199
                 public void onSuccess(String childId) {
200
                     destroyStack(stackToDestroy);
200
                     destroyStack(stackToDestroy);
201
-                    for (int i = 0; i < children.size() - 1; i++) {
201
+                    for (int i = 0; i < children.size(); i++) {
202
                         stack.set(children.get(i).getId(), children.get(i), i);
202
                         stack.set(children.get(i).getId(), children.get(i), i);
203
                         children.get(i).setParentController(StackController.this);
203
                         children.get(i).setParentController(StackController.this);
204
                         if (i == 0) {
204
                         if (i == 0) {