From 37f43759b83e31fb8207ac3d7d9985c4a0d1edc9 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Wed, 24 Oct 2018 17:09:34 +0530 Subject: Tunnel creation: After saving the new tunnel, show the detail view Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/VPN/TunnelsManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'WireGuard/WireGuard/VPN') 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) { -- cgit v1.2.3-59-g8ed1b