macOS: Select the active tunnel when showing the manage tunnels window

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander
2019-01-24 18:35:07 +05:30
parent 52eec55d36
commit eabeb8ff05
2 changed files with 18 additions and 1 deletions
@@ -226,6 +226,10 @@ class TunnelsManager {
return tunnels[index]
}
func index(of tunnel: TunnelContainer) -> Int? {
return tunnels.firstIndex(of: tunnel)
}
func tunnel(named tunnelName: String) -> TunnelContainer? {
return tunnels.first { $0.name == tunnelName }
}