|
@@ -5,9 +5,7 @@ import android.os.Handler;
|
5
|
5
|
import android.support.annotation.NonNull;
|
6
|
6
|
|
7
|
7
|
import com.facebook.react.ReactPackage;
|
8
|
|
-import com.facebook.react.bridge.ReactContext;
|
9
|
8
|
import com.facebook.react.shell.MainReactPackage;
|
10
|
|
-import com.reactnativenavigation.bridge.NavigationReactEventEmitter;
|
11
|
9
|
import com.reactnativenavigation.bridge.NavigationReactPackage;
|
12
|
10
|
import com.reactnativenavigation.react.NavigationReactInstance;
|
13
|
11
|
|
|
@@ -18,7 +16,6 @@ public abstract class NavigationApplication extends Application {
|
18
|
16
|
|
19
|
17
|
public static NavigationApplication instance;
|
20
|
18
|
private NavigationReactInstance navigationReactInstance;
|
21
|
|
- private NavigationReactEventEmitter reactEventEmitter;
|
22
|
19
|
private Handler handler;
|
23
|
20
|
|
24
|
21
|
@Override
|
|
@@ -30,18 +27,6 @@ public abstract class NavigationApplication extends Application {
|
30
|
27
|
navigationReactInstance.startReactContextOnceInBackgroundAndExecuteJS();
|
31
|
28
|
}
|
32
|
29
|
|
33
|
|
- public NavigationReactEventEmitter getReactEventEmitter() {
|
34
|
|
- if (reactEventEmitter == null) {
|
35
|
|
- reactEventEmitter = new NavigationReactEventEmitter(getCurrentReactContext());
|
36
|
|
- }
|
37
|
|
-
|
38
|
|
- return reactEventEmitter;
|
39
|
|
- }
|
40
|
|
-
|
41
|
|
- private ReactContext getCurrentReactContext() {
|
42
|
|
- return navigationReactInstance.getReactInstanceManager().getCurrentReactContext();
|
43
|
|
- }
|
44
|
|
-
|
45
|
30
|
public Handler getMainHandler() {
|
46
|
31
|
return handler;
|
47
|
32
|
}
|