Quellcode durchsuchen

fix for late packer start

Daniel Zlotin vor 7 Jahren
Ursprung
Commit
7d919d38e9

+ 1
- 2
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactInitializer.java Datei anzeigen

@@ -28,6 +28,7 @@ public class NavigationReactInitializer implements ReactInstanceManager.ReactIns
28 28
 			devPermissionRequest.askPermission(activity);
29 29
 		} else {
30 30
 			reactInstanceManager.onHostResume(activity, activity);
31
+			reactInstanceManager.addReactInstanceEventListener(this);
31 32
 			checkBundleThenPrepareReact(activity);
32 33
 		}
33 34
 	}
@@ -55,7 +56,6 @@ public class NavigationReactInitializer implements ReactInstanceManager.ReactIns
55 56
 						public void run() {
56 57
 							if (!packagerIsRunning) {
57 58
 								activity.toast("Packager is not running!");
58
-								activity.finish();
59 59
 							} else {
60 60
 								prepareReactAppWithWorkingBundle();
61 61
 							}
@@ -69,7 +69,6 @@ public class NavigationReactInitializer implements ReactInstanceManager.ReactIns
69 69
 	}
70 70
 
71 71
 	private void prepareReactAppWithWorkingBundle() {
72
-		reactInstanceManager.addReactInstanceEventListener(this);
73 72
 		if (shouldCreateContext()) {
74 73
 			reactInstanceManager.createReactContextInBackground();
75 74
 		} else if (waitingForAppLaunchEvent) {