mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-16 12:52:06 +00:00
Dismiss qr scan vc on cancel.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
37be243317
commit
9906e6ba04
@ -105,7 +105,9 @@ class QRScanViewController: UIViewController {
|
|||||||
let tunnel = try Tunnel.fromConfig(code, context: viewContext)
|
let tunnel = try Tunnel.fromConfig(code, context: viewContext)
|
||||||
let alert = UIAlertController(title: NSLocalizedString("Enter a title for new tunnel", comment: ""), message: nil, preferredStyle: .alert)
|
let alert = UIAlertController(title: NSLocalizedString("Enter a title for new tunnel", comment: ""), message: nil, preferredStyle: .alert)
|
||||||
alert.addTextField(configurationHandler: nil)
|
alert.addTextField(configurationHandler: nil)
|
||||||
alert.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil))
|
alert.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: { [weak self] _ in
|
||||||
|
self?.delegate?.didCancel(qrScanViewController: self!)
|
||||||
|
}))
|
||||||
alert.addAction(UIAlertAction(title: NSLocalizedString("Save", comment: ""), style: .default, handler: { [weak self] _ in
|
alert.addAction(UIAlertAction(title: NSLocalizedString("Save", comment: ""), style: .default, handler: { [weak self] _ in
|
||||||
do {
|
do {
|
||||||
tunnel.title = alert.textFields?[0].text
|
tunnel.title = alert.textFields?[0].text
|
||||||
|
Loading…
Reference in New Issue
Block a user