Allow turning off the status switch of a waiting tunnel
It just means the waiting should be cancelled Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
9946d8f989
commit
4d63a3e9bd
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue