WireGuardApp: Remove 200ms delay when updating tunnel status switch
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
facf776602
commit
5d2a337332
@@ -343,10 +343,8 @@ extension TunnelDetailTableViewController {
|
||||
text = tr("tunnelStatusWaiting")
|
||||
}
|
||||
cell.textLabel?.text = text
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(200)) { [weak cell] in
|
||||
cell?.switchView.isOn = !(status == .deactivating || status == .inactive)
|
||||
cell?.switchView.isUserInteractionEnabled = (status == .inactive || status == .active)
|
||||
}
|
||||
cell.switchView.isOn = !(status == .deactivating || status == .inactive)
|
||||
cell.switchView.isUserInteractionEnabled = (status == .inactive || status == .active)
|
||||
cell.isEnabled = status == .active || status == .inactive
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user