Browse Source

Add commandType param to props which indicates if a screen is displayed using push or modal

Guy Carmeli 7 years ago
parent
commit
57d016d835
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      src/deprecated/platformSpecificDeprecated.android.js

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

80
   adapted = adaptNavigationParams(adapted);
80
   adapted = adaptNavigationParams(adapted);
81
   adapted.overrideBackPress = params.overrideBackPress;
81
   adapted.overrideBackPress = params.overrideBackPress;
82
   adapted.timestamp = Date.now();
82
   adapted.timestamp = Date.now();
83
+  if (!adapted.passProps) {
84
+    adapted.passProps = {};
85
+  }
86
+  if (!adapted.passProps.commandType) {
87
+    adapted.passProps.commandType = 'Push';
88
+  }
83
 
89
 
84
   return newPlatformSpecific.push(adapted);
90
   return newPlatformSpecific.push(adapted);
85
 }
91
 }
472
   adapted = adaptNavigationParams(adapted);
478
   adapted = adaptNavigationParams(adapted);
473
   adapted.overrideBackPress = params.overrideBackPress;
479
   adapted.overrideBackPress = params.overrideBackPress;
474
   adapted.timestamp = Date.now();
480
   adapted.timestamp = Date.now();
481
+  if (!adapted.passProps) {
482
+    adapted.passProps = {};
483
+  }
484
+  if (!adapted.passProps.commandType) {
485
+    adapted.passProps.commandType = 'ShowModal';
486
+  }
475
 
487
 
476
   newPlatformSpecific.showModal(adapted);
488
   newPlatformSpecific.showModal(adapted);
477
 }
489
 }