|
@@ -7,13 +7,13 @@ import com.facebook.react.ReactInstanceManager;
|
7
|
7
|
import com.reactnativenavigation.parse.ExternalComponent;
|
8
|
8
|
import com.reactnativenavigation.parse.Options;
|
9
|
9
|
import com.reactnativenavigation.presentation.ExternalComponentPresenter;
|
|
10
|
+import com.reactnativenavigation.presentation.Presenter;
|
10
|
11
|
import com.reactnativenavigation.react.events.ComponentType;
|
11
|
12
|
import com.reactnativenavigation.react.events.EventEmitter;
|
12
|
13
|
import com.reactnativenavigation.utils.CoordinatorLayoutUtils;
|
13
|
14
|
import com.reactnativenavigation.utils.StatusBarUtils;
|
14
|
|
-import com.reactnativenavigation.viewcontrollers.NoOpYellowBoxDelegate;
|
15
|
|
-import com.reactnativenavigation.viewcontrollers.ViewController;
|
16
|
|
-import com.reactnativenavigation.viewcontrollers.viewcontrolleroverlay.ViewControllerOverlay;
|
|
15
|
+import com.reactnativenavigation.viewcontrollers.ChildController;
|
|
16
|
+import com.reactnativenavigation.viewcontrollers.ChildControllersRegistry;
|
17
|
17
|
import com.reactnativenavigation.views.BehaviourDelegate;
|
18
|
18
|
import com.reactnativenavigation.views.ExternalComponentLayout;
|
19
|
19
|
|
|
@@ -22,20 +22,20 @@ import androidx.fragment.app.FragmentActivity;
|
22
|
22
|
|
23
|
23
|
import static com.reactnativenavigation.utils.ObjectUtils.perform;
|
24
|
24
|
|
25
|
|
-public class ExternalComponentViewController extends ViewController<ExternalComponentLayout> {
|
|
25
|
+public class ExternalComponentViewController extends ChildController<ExternalComponentLayout> {
|
26
|
26
|
private final ExternalComponent externalComponent;
|
27
|
27
|
private final ExternalComponentCreator componentCreator;
|
28
|
28
|
private ReactInstanceManager reactInstanceManager;
|
29
|
29
|
private final EventEmitter emitter;
|
30
|
30
|
private final ExternalComponentPresenter presenter;
|
31
|
31
|
|
32
|
|
- public ExternalComponentViewController(Activity activity, String id, ExternalComponent externalComponent, ExternalComponentCreator componentCreator, ReactInstanceManager reactInstanceManager, EventEmitter emitter, ExternalComponentPresenter presenter, Options initialOptions) {
|
33
|
|
- super(activity, id, new NoOpYellowBoxDelegate(), initialOptions, new ViewControllerOverlay(activity));
|
|
32
|
+ public ExternalComponentViewController(Activity activity, ChildControllersRegistry childRegistry, String id, Presenter presenter, ExternalComponent externalComponent, ExternalComponentCreator componentCreator, ReactInstanceManager reactInstanceManager, EventEmitter emitter, ExternalComponentPresenter externalComponentPresenter, Options initialOptions) {
|
|
33
|
+ super(activity, childRegistry, id, presenter, initialOptions);
|
34
|
34
|
this.externalComponent = externalComponent;
|
35
|
35
|
this.componentCreator = componentCreator;
|
36
|
36
|
this.reactInstanceManager = reactInstanceManager;
|
37
|
37
|
this.emitter = emitter;
|
38
|
|
- this.presenter = presenter;
|
|
38
|
+ this.presenter = externalComponentPresenter;
|
39
|
39
|
}
|
40
|
40
|
|
41
|
41
|
@Override
|
|
@@ -53,13 +53,6 @@ public class ExternalComponentViewController extends ViewController<ExternalComp
|
53
|
53
|
emitter.emitOnNavigationButtonPressed(getId(), buttonId);
|
54
|
54
|
}
|
55
|
55
|
|
56
|
|
- @Override
|
57
|
|
- public void mergeOptions(Options options) {
|
58
|
|
- if (options == Options.EMPTY) return;
|
59
|
|
- performOnParentController(parentController -> parentController.mergeChildOptions(options, this));
|
60
|
|
- super.mergeOptions(options);
|
61
|
|
- }
|
62
|
|
-
|
63
|
56
|
@Override
|
64
|
57
|
public void onViewAppeared() {
|
65
|
58
|
super.onViewAppeared();
|