|
@@ -4,8 +4,10 @@ import android.app.Activity;
|
4
|
4
|
import android.support.v4.app.FragmentActivity;
|
5
|
5
|
|
6
|
6
|
import com.facebook.react.ReactInstanceManager;
|
|
7
|
+import com.facebook.react.bridge.ReactContext;
|
7
|
8
|
import com.reactnativenavigation.parse.ExternalComponent;
|
8
|
9
|
import com.reactnativenavigation.parse.Options;
|
|
10
|
+import com.reactnativenavigation.react.EventEmitter;
|
9
|
11
|
import com.reactnativenavigation.viewcontrollers.NoOpYellowBoxDelegate;
|
10
|
12
|
import com.reactnativenavigation.viewcontrollers.ViewController;
|
11
|
13
|
import com.reactnativenavigation.views.ExternalComponentLayout;
|
|
@@ -31,7 +33,10 @@ public class ExternalComponentViewController extends ViewController<ExternalComp
|
31
|
33
|
|
32
|
34
|
@Override
|
33
|
35
|
public void sendOnNavigationButtonPressed(String buttonId) {
|
34
|
|
-
|
|
36
|
+ ReactContext currentReactContext = reactInstanceManager.getCurrentReactContext();
|
|
37
|
+ if (currentReactContext != null) {
|
|
38
|
+ new EventEmitter(currentReactContext).emitOnNavigationButtonPressed(getId(), buttonId);
|
|
39
|
+ }
|
35
|
40
|
}
|
36
|
41
|
|
37
|
42
|
public FragmentActivity getActivity() {
|