소스 검색

fixed incorrect reactEventEmitter init

Daniel Zlotin 8 년 전
부모
커밋
d33e34382b
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1
    3
      android/app/src/main/java/com/reactnativenavigation/react/NavigationReactGateway.java

+ 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