]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Allow turning off the status switch of a waiting tunnel
authorRoopesh Chander <roop@roopc.net>
Mon, 10 Dec 2018 20:06:15 +0000 (01:36 +0530)
committerRoopesh Chander <roop@roopc.net>
Mon, 10 Dec 2018 20:31:54 +0000 (02:01 +0530)
It just means the waiting should be cancelled

Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift

index 5c6cf156807395a7ae619f8294dc4460d320ffbc..fffaeb95ea586fbb5bae4dec812fb9f1410564da 100644 (file)
@@ -276,7 +276,7 @@ class TunnelDetailTableViewStatusCell: UITableViewCell {
         DispatchQueue.main.async { [weak statusSwitch] in
             guard let statusSwitch = statusSwitch else { return }
             statusSwitch.isOn = !(status == .deactivating || status == .inactive)
-            statusSwitch.isUserInteractionEnabled = (status == .inactive || status == .active)
+            statusSwitch.isUserInteractionEnabled = (status == .inactive || status == .active || status == .waiting)
         }
         textLabel?.textColor = (status == .active || status == .inactive) ? UIColor.black : UIColor.gray
     }
index b1102c47997d9d70c2be7bc4022cfc1c0566d572..7c76aa6c2e5881241fad4a32a3e6836a4d02d25a 100644 (file)
@@ -390,7 +390,7 @@ class TunnelsListTableViewCell: UITableViewCell {
         DispatchQueue.main.async { [weak statusSwitch, weak busyIndicator] in
             guard let statusSwitch = statusSwitch, let busyIndicator = busyIndicator else { return }
             statusSwitch.isOn = !(status == .deactivating || status == .inactive)
-            statusSwitch.isUserInteractionEnabled = (status == .inactive || status == .active)
+            statusSwitch.isUserInteractionEnabled = (status == .inactive || status == .active || status == .waiting)
             if (status == .inactive || status == .active) {
                 busyIndicator.stopAnimating()
             } else {