From aa0629d20283c0da401fdae21873e908c02a865b Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 27 Oct 2022 23:10:00 -0400 Subject: [PATCH] Don't dismiss issue reporter when email is cancelled Closes #191 --- .../Crash Reporter/IssueReporterViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Crash Reporter/IssueReporterViewController.swift b/Tusker/Screens/Crash Reporter/IssueReporterViewController.swift index 2b777704..8afa5727 100644 --- a/Tusker/Screens/Crash Reporter/IssueReporterViewController.swift +++ b/Tusker/Screens/Crash Reporter/IssueReporterViewController.swift @@ -154,7 +154,11 @@ class IssueReporterViewController: UIViewController { extension IssueReporterViewController: MFMailComposeViewControllerDelegate { func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { controller.dismiss(animated: true) { - self.dismiss() + if result == .cancelled { + // don't dismiss ourself, to allowe the user to send the report a different way + } else { + self.dismiss() + } } } }