diff options
author | Roopesh Chander <roop@roopc.net> | 2018-10-24 17:09:34 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-10-27 15:13:01 +0530 |
commit | 37f43759b83e31fb8207ac3d7d9985c4a0d1edc9 (patch) | |
tree | bfe053c3bf66e0bc785e7b37c22d26d8a36113c7 /WireGuard/WireGuard/VPN | |
parent | Tunnel detail: Don't show fields that have empty value (diff) | |
download | wireguard-apple-37f43759b83e31fb8207ac3d7d9985c4a0d1edc9.tar.xz wireguard-apple-37f43759b83e31fb8207ac3d7d9985c4a0d1edc9.zip |
Tunnel creation: After saving the new tunnel, show the detail view
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/VPN')
-rw-r--r-- | WireGuard/WireGuard/VPN/TunnelsManager.swift | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index 936f59f..704506a 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -49,7 +49,7 @@ class TunnelsManager { completionHandler(TunnelsManager(tunnelProviders: [])) } - func add(tunnelConfiguration: TunnelConfiguration, completionHandler: @escaping (Error?) -> Void) { + func add(tunnelConfiguration: TunnelConfiguration, completionHandler: @escaping (TunnelContainer, Error?) -> Void) { let tunnelProvider = TunnelProviderManager(tunnelConfiguration: tunnelConfiguration) for tunnel in tunnels { tunnel.index = tunnel.index + 1 @@ -57,7 +57,7 @@ class TunnelsManager { let tunnel = TunnelContainer(tunnel: tunnelProvider, index: 0) tunnels.insert(tunnel, at: 0) delegate?.tunnelsAdded(atIndex: 0, numberOfTunnels: 1) - completionHandler(nil) + completionHandler(tunnel, nil) } func modify(tunnel: TunnelContainer, with tunnelConfiguration: TunnelConfiguration, completionHandler: @escaping (Error?) -> Void) { |