Tunnels list: Fix status switch look after flipping it off after an error

This commit is contained in:
Roopesh Chander 2018-11-03 17:28:16 +05:30
parent 0d4218f0c7
commit bfdb3efa41
1 changed files with 5 additions and 4 deletions

View File

@ -290,10 +290,11 @@ extension TunnelsListTableViewController: UITableViewDataSource {
if (isOn) {
tunnelsManager.startActivation(of: tunnel) { [weak s] error in
if let error = error {
ErrorPresenter.showErrorAlert(error: error, from: s)
DispatchQueue.main.async {
cell.statusSwitch.isOn = false
}
ErrorPresenter.showErrorAlert(error: error, from: s, onPresented: {
DispatchQueue.main.async {
cell.statusSwitch.isOn = false
}
})
}
}
} else {