diff options
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift index f8c43c8..15da060 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift @@ -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 { |