|
@@ -33,12 +33,7 @@ function startTabBasedApp(params) {
|
33
|
33
|
addNavigatorParams(tab, null, idx);
|
34
|
34
|
addNavigatorButtons(tab);
|
35
|
35
|
addNavigationStyleParams(tab);
|
36
|
|
- if (tab.icon) {
|
37
|
|
- const icon = resolveAssetSource(tab.icon);
|
38
|
|
- if (icon) {
|
39
|
|
- tab.icon = icon.uri;
|
40
|
|
- }
|
41
|
|
- }
|
|
36
|
+ addTabIcon(tab);
|
42
|
37
|
tab.passProps = params.passProps;
|
43
|
38
|
});
|
44
|
39
|
|
|
@@ -46,6 +41,19 @@ function startTabBasedApp(params) {
|
46
|
41
|
RctActivity.startTabBasedApp(params.tabs, params.tabsStyle, drawer);
|
47
|
42
|
}
|
48
|
43
|
|
|
44
|
+function addTabIcon(tab) {
|
|
45
|
+ if (tab.icon) {
|
|
46
|
+ const icon = resolveAssetSource(tab.icon);
|
|
47
|
+ if (icon) {
|
|
48
|
+ tab.icon = icon.uri;
|
|
49
|
+ }
|
|
50
|
+ }
|
|
51
|
+
|
|
52
|
+ if (!tab.icon) {
|
|
53
|
+ throw new Error("No icon defined for tab " + tab.screen);
|
|
54
|
+ }
|
|
55
|
+}
|
|
56
|
+
|
49
|
57
|
function navigatorPush(navigator, params) {
|
50
|
58
|
addNavigatorParams(params, navigator);
|
51
|
59
|
addNavigatorButtons(params);
|