|
@@ -38,15 +38,19 @@ public class NavigationReactNativeHost extends ReactNativeHost {
|
38
|
38
|
@Override
|
39
|
39
|
protected List<ReactPackage> getPackages() {
|
40
|
40
|
List<ReactPackage> packages = new ArrayList<>();
|
41
|
|
- packages.add(new MainReactPackage());
|
|
41
|
+ boolean hasMainReactPackage = false;
|
42
|
42
|
packages.add(new NavigationPackage(this));
|
43
|
43
|
if (additionalReactPackages != null) {
|
44
|
44
|
for (ReactPackage p : additionalReactPackages) {
|
45
|
|
- if (!(p instanceof MainReactPackage || p instanceof NavigationPackage)) {
|
|
45
|
+ if (!(p instanceof NavigationPackage)) {
|
46
|
46
|
packages.add(p);
|
47
|
47
|
}
|
|
48
|
+ if (p instanceof MainReactPackage) hasMainReactPackage = true;
|
48
|
49
|
}
|
49
|
50
|
}
|
|
51
|
+ if (!hasMainReactPackage) {
|
|
52
|
+ packages.add(new MainReactPackage());
|
|
53
|
+ }
|
50
|
54
|
return packages;
|
51
|
55
|
}
|
52
|
56
|
}
|