Browse Source

Destroy screen when swapping screens

Guy Carmeli 7 years ago
parent
commit
2b62f7c14d

+ 1
- 2
android/app/src/main/java/com/reactnativenavigation/screens/ScreenStack.java View File

154
         if (!canPop()) {
154
         if (!canPop()) {
155
             return;
155
             return;
156
         }
156
         }
157
-
158
         if (keyboardVisibilityDetector.isKeyboardVisible()) {
157
         if (keyboardVisibilityDetector.isKeyboardVisible()) {
159
             keyboardVisibilityDetector.setKeyboardCloseListener(new Runnable() {
158
             keyboardVisibilityDetector.setKeyboardCloseListener(new Runnable() {
160
                 @Override
159
                 @Override
181
         toRemove.hide(animated, new Runnable() {
180
         toRemove.hide(animated, new Runnable() {
182
             @Override
181
             @Override
183
             public void run() {
182
             public void run() {
184
-                toRemove.unmountReactView();
183
+                toRemove.destroy();
185
                 parent.removeView(toRemove);
184
                 parent.removeView(toRemove);
186
             }
185
             }
187
         });
186
         });