|
@@ -14,15 +14,12 @@ public class ContentView extends ReactRootView {
|
14
|
14
|
private final String screenId;
|
15
|
15
|
private final String navigatorEventId;
|
16
|
16
|
private final Bundle passProps;
|
17
|
|
- private Bundle navigationParams;
|
18
|
17
|
|
19
|
|
- public ContentView(Context context, ScreenParams screenParams, String screenId) {
|
|
18
|
+ public ContentView(Context context, ScreenParams screenParams, String screenId, Bundle passProps) {
|
20
|
19
|
super(context);
|
21
|
20
|
this.screenId = screenId;
|
22
|
21
|
navigatorEventId = screenParams.navigatorEventId;
|
23
|
|
-
|
24
|
|
- passProps = screenParams.passProps;
|
25
|
|
- navigationParams = screenParams.navigationParams;
|
|
22
|
+ this.passProps = mergePropsAndNavigationParams(screenParams, passProps);
|
26
|
23
|
attachToJS();
|
27
|
24
|
}
|
28
|
25
|
|
|
@@ -44,10 +41,11 @@ public class ContentView extends ReactRootView {
|
44
|
41
|
|
45
|
42
|
private void attachToJS() {
|
46
|
43
|
ReactInstanceManager react = NavigationApplication.instance.getNavigationReactInstance().getReactInstanceManager();
|
47
|
|
- startReactApplication(react, screenId, mergePropsAndNavigationParams());
|
|
44
|
+ startReactApplication(react, screenId, passProps);
|
48
|
45
|
}
|
49
|
46
|
|
50
|
|
- private Bundle mergePropsAndNavigationParams() {
|
|
47
|
+ private Bundle mergePropsAndNavigationParams(ScreenParams screenParams, Bundle passProps) {
|
|
48
|
+ Bundle navigationParams = (Bundle) screenParams.navigationParams.clone();
|
51
|
49
|
if (passProps != null) {
|
52
|
50
|
navigationParams.putAll(passProps);
|
53
|
51
|
}
|