Просмотр исходного кода

fixed incorrect reactEventEmitter init

Daniel Zlotin 8 лет назад
Родитель
Сommit
d33e34382b

+ 1
- 3
android/app/src/main/java/com/reactnativenavigation/react/NavigationReactGateway.java Просмотреть файл

@@ -43,9 +43,6 @@ public class NavigationReactGateway implements ReactGateway {
43 43
     }
44 44
 
45 45
     public NavigationReactEventEmitter getReactEventEmitter() {
46
-        if (reactEventEmitter == null && isInitialized()) {
47
-            reactEventEmitter = new NavigationReactEventEmitter(getReactContext());
48
-        }
49 46
         return reactEventEmitter;
50 47
     }
51 48
 
@@ -68,6 +65,7 @@ public class NavigationReactGateway implements ReactGateway {
68 65
     }
69 66
 
70 67
     public void onResumeActivity(Activity activity, DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler) {
68
+        reactEventEmitter = new NavigationReactEventEmitter(getReactContext());
71 69
         getReactInstanceManager().onHostResume(activity, defaultHardwareBackBtnHandler);
72 70
     }
73 71