]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
QR code: Fix what happens when an error is shown
authorRoopesh Chander <roop@roopc.net>
Thu, 1 Nov 2018 13:29:14 +0000 (18:59 +0530)
committerRoopesh Chander <roop@roopc.net>
Thu, 1 Nov 2018 16:38:01 +0000 (22:08 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/iOS/QRScanViewController.swift

index ec397f699a9f4697334a40bdae4422cb1f8008f6..99af984356407086c857101b8880978712839fe3 100644 (file)
@@ -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