Skip to content

Commit bf300d0

Browse files
fix: share dialog with modal (#988)
Co-authored-by: Shruthi R Salian <[email protected]>
1 parent 7ce9b1d commit bf300d0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ios/RNShare.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,13 @@ - (NSDictionary *)constantsToExport
267267

268268
// always dismiss since this may be called from cancelled shares
269269
// but the share menu would remain open, and our callback would fire again on close
270-
[controller dismissViewControllerAnimated:true completion:nil];
270+
if(weakShareController){
271+
// closing activity view controller
272+
[weakShareController dismissViewControllerAnimated:true completion:nil];
273+
} else {
274+
[controller dismissViewControllerAnimated:true completion:nil];
275+
}
276+
271277

272278
if (activityError) {
273279
failureCallback(activityError);

0 commit comments

Comments
 (0)