From: Roopesh Chander Date: Thu, 1 Nov 2018 13:29:14 +0000 (+0530) Subject: QR code: Fix what happens when an error is shown X-Git-Tag: 0.0.20181104-1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=196daccddec34e0c2dcf0a453f1dce6353e89daa;p=thirdparty%2Fwireguard-apple.git QR code: Fix what happens when an error is shown Signed-off-by: Roopesh Chander --- diff --git a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift index ec397f6..99af984 100644 --- a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift @@ -131,7 +131,7 @@ class QRScanViewController: UIViewController { func scanDidEncounterError(title: String, message: String) { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: { [weak self] _ in - self?.navigationController?.popViewController(animated: true) + self?.dismiss(animated: true, completion: nil) })) present(alertController, animated: true) captureSession = nil