Browse Source

Revert "fix issues with Android BackHandler listeners not getting called, not allowing to override the back functionality from the JS side (#2057)" (#2060)

This reverts commit 3dd185ecad.
Guy Carmeli 7 years ago
parent
commit
365647ae50

+ 2
- 4
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java View File

@@ -172,14 +172,12 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
172 172
 
173 173
     @Override
174 174
     public void invokeDefaultOnBackPressed() {
175
-        if (layout != null && !layout.onBackPressed()) {
176
-            super.onBackPressed();
177
-        }
175
+        super.onBackPressed();
178 176
     }
179 177
 
180 178
     @Override
181 179
     public void onBackPressed() {
182
-        if (getReactGateway().isInitialized()) {
180
+        if (layout != null && !layout.onBackPressed()) {
183 181
             getReactGateway().onBackPressed();
184 182
         }
185 183
     }