|
@@ -17,7 +17,6 @@ import com.reactnativenavigation.params.TitleBarLeftButtonParams;
|
17
|
17
|
import com.reactnativenavigation.react.JsDevReloadHandler;
|
18
|
18
|
import com.reactnativenavigation.react.ReactGateway;
|
19
|
19
|
import com.reactnativenavigation.react.RedboxPermission;
|
20
|
|
-import com.reactnativenavigation.utils.IntentUtils;
|
21
|
20
|
|
22
|
21
|
import java.util.List;
|
23
|
22
|
|
|
@@ -36,16 +35,13 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
|
36
|
35
|
private ActivityParams activityParams;
|
37
|
36
|
private ModalController modalController;
|
38
|
37
|
private Layout layout;
|
39
|
|
- private boolean waitingForNewJsContext = false;
|
40
|
38
|
|
41
|
39
|
@Override
|
42
|
40
|
protected void onCreate(Bundle savedInstanceState) {
|
43
|
41
|
super.onCreate(savedInstanceState);
|
44
|
42
|
|
45
|
43
|
if (!NavigationApplication.instance.isReactContextInitialized()) {
|
46
|
|
- waitingForNewJsContext = true;
|
47
|
|
- finish();
|
48
|
|
- startActivity(IntentUtils.getLauncherIntent());
|
|
44
|
+ NavigationApplication.instance.startReactContext();
|
49
|
45
|
return;
|
50
|
46
|
}
|
51
|
47
|
|
|
@@ -108,7 +104,7 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
|
108
|
104
|
}
|
109
|
105
|
|
110
|
106
|
private void destroyJsIfNeeded() {
|
111
|
|
- if (!waitingForNewJsContext && (currentActivity == null || currentActivity.isFinishing())) {
|
|
107
|
+ if (currentActivity == null || currentActivity.isFinishing()) {
|
112
|
108
|
NavigationApplication.instance.getReactGateway().onDestroyApp();
|
113
|
109
|
}
|
114
|
110
|
}
|