Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions RNMail/RNMail.m
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,8 @@ - (void)mailComposeController:(MFMailComposeViewController *)controller didFinis
} else {
RCTLogWarn(@"No callback registered for mail: %@", controller.title);
}
UIViewController *ctrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
while (ctrl.presentedViewController && ctrl != controller) {
ctrl = ctrl.presentedViewController;
}
[ctrl dismissViewControllerAnimated:YES completion:nil];

[controller dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark Private
Expand Down