Browse Source

save additional screens passProps

Guy Carmeli 7 years ago
parent
commit
b081e69146

+ 0
- 2
src/deprecated/platformSpecificDeprecated.android.js View File

@@ -317,9 +317,7 @@ async function startTabBasedApp(params) {
317 317
       const screen = createBottomTabScreen(components[0], idx, params)
318 318
       const {label, icon} = components[0];
319 319
       components.shift();
320
-      console.log('guyca', `${JSON.stringify(components[0])}`);
321 320
       screen.screens = components.map(c => createBottomTabScreen({...c, icon, label}, idx, params));
322
-      
323 321
       newTabs.push(screen);
324 322
     } else {
325 323
       newTabs.push(createBottomTabScreen(tab, idx, params));

+ 8
- 0
src/platformSpecific.android.js View File

@@ -88,6 +88,10 @@ function savePassProps(params) {
88 88
     PropRegistry.save(params.screen.navigationParams.screenInstanceID, params.screen.passProps);
89 89
   }
90 90
 
91
+  if (_.get(params, 'screen.screens')) {
92
+    _.forEach(params.screen.screens, savePassProps)
93
+  }
94
+
91 95
   if (_.get(params, 'screen.topTabs')) {
92 96
     _.forEach(params.screen.topTabs, (tab) => savePassProps(tab));
93 97
   }
@@ -102,6 +106,10 @@ function savePassProps(params) {
102 106
         tab.passProps = params.passProps;
103 107
       }
104 108
       savePassProps(tab);
109
+      
110
+      if (tab.screens) {
111
+        _.forEach(tab.screens, savePassProps)
112
+      }
105 113
     });
106 114
   }
107 115