Tunnel detail: Cell status switch should be toggled only after the alert presentation completes
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -160,10 +160,11 @@ extension TunnelDetailTableViewController {
|
|||||||
if (isOn) {
|
if (isOn) {
|
||||||
s.tunnelsManager.startActivation(of: s.tunnel) { [weak s] error in
|
s.tunnelsManager.startActivation(of: s.tunnel) { [weak s] error in
|
||||||
if let error = error {
|
if let error = error {
|
||||||
ErrorPresenter.showErrorAlert(error: error, from: s)
|
ErrorPresenter.showErrorAlert(error: error, from: s, onPresented: {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
cell.statusSwitch.isOn = false
|
cell.statusSwitch.isOn = false
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user