Browse Source

notify when modal dismissed (after animation if exists) (#736)

Ran 8 years ago
parent
commit
317c7773e3

+ 4
- 0
ios/RCCManagerModule.m View File

325
         [vc dismissViewControllerAnimated:![animationType isEqualToString:@"none"]
325
         [vc dismissViewControllerAnimated:![animationType isEqualToString:@"none"]
326
                                completion:^(){ resolve(nil); }];
326
                                completion:^(){ resolve(nil); }];
327
     }
327
     }
328
+    else
329
+    {
330
+      resolve(nil);
331
+    }
328
 }
332
 }
329
 
333
 
330
 RCT_EXPORT_METHOD(
334
 RCT_EXPORT_METHOD(

+ 2
- 2
src/deprecated/controllers/index.js View File

258
       _validateDrawerProps(layout);
258
       _validateDrawerProps(layout);
259
       RCCManager.showController(layout, animationType, passProps);
259
       RCCManager.showController(layout, animationType, passProps);
260
     },
260
     },
261
-    dismissController: function(animationType = 'slide-down') {
262
-      RCCManager.dismissController(animationType);
261
+    dismissController: async function(animationType = 'slide-down') {
262
+      return await RCCManager.dismissController(animationType);
263
     },
263
     },
264
     dismissAllControllers: function(animationType = 'slide-down') {
264
     dismissAllControllers: function(animationType = 'slide-down') {
265
       RCCManager.dismissAllControllers(animationType);
265
       RCCManager.dismissAllControllers(animationType);

+ 2
- 2
src/deprecated/platformSpecificDeprecated.ios.js View File

442
   Modal.showController(controllerID, params.animationType);
442
   Modal.showController(controllerID, params.animationType);
443
 }
443
 }
444
 
444
 
445
-function dismissModal(params) {
446
-  Modal.dismissController(params.animationType);
445
+async function dismissModal(params) {
446
+  return await Modal.dismissController(params.animationType);
447
 }
447
 }
448
 
448
 
449
 function dismissAllModals(params) {
449
 function dismissAllModals(params) {