aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift')
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift15
1 files changed, 6 insertions, 9 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
index 9d8cc82..1a8520d 100644
--- a/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/TunnelListCell.swift
@@ -87,15 +87,12 @@ class TunnelListCell: UITableViewCell {
reset()
return
}
- DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(200)) { [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)
- if status == .inactive || status == .active {
- busyIndicator.stopAnimating()
- } else {
- busyIndicator.startAnimating()
- }
+ statusSwitch.isOn = !(status == .deactivating || status == .inactive)
+ statusSwitch.isUserInteractionEnabled = (status == .inactive || status == .active)
+ if status == .inactive || status == .active {
+ busyIndicator.stopAnimating()
+ } else {
+ busyIndicator.startAnimating()
}
}