Allow turning off the status switch of a waiting tunnel
It just means the waiting should be cancelled
This commit is contained in:
parent
9906689122
commit
56730ef048
|
@ -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