diff options
author | Roopesh Chander <roop@roopc.net> | 2018-11-09 19:29:34 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-11-09 19:29:34 +0530 |
commit | 1d63509b9224432c1a495c33fbf179123217eac4 (patch) | |
tree | 5f6c407ef5119bb96f76a4c18633f75eb394daa9 /WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | |
parent | Remove unused code (diff) | |
download | wireguard-apple-1d63509b9224432c1a495c33fbf179123217eac4.tar.xz wireguard-apple-1d63509b9224432c1a495c33fbf179123217eac4.zip |
VPN: Refresh tunnel statuses when app gets to the foreground
Because the tunnel could've be activated from iOS Settings now
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift index d40eef7..a9d858e 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift @@ -223,6 +223,16 @@ class TunnelsListTableViewController: UIViewController { } } } + + func refreshTunnelConnectionStatuses() { + if let tunnelsManager = tunnelsManager { + tunnelsManager.refreshConnectionStatuses() + } else { + onTunnelsManagerReady = { tunnelsManager in + tunnelsManager.refreshConnectionStatuses() + } + } + } } // MARK: UIDocumentPickerDelegate |