aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift12
1 files changed, 12 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
index 9e84e12..3c07060 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
@@ -192,6 +192,7 @@ class TunnelDetailTableViewController: NSViewController {
@objc func editButtonClicked() {
let tunnelEditVC = TunnelEditViewController(tunnelsManager: tunnelsManager, tunnel: tunnel)
+ tunnelEditVC.delegate = self
presentAsSheet(tunnelEditVC)
}
@@ -234,3 +235,14 @@ extension TunnelDetailTableViewController: NSTableViewDelegate {
}
}
}
+
+extension TunnelDetailTableViewController: TunnelEditViewControllerDelegate {
+ func tunnelSaved(tunnel: TunnelContainer) {
+ tunnelViewModel = TunnelViewModel(tunnelConfiguration: tunnel.tunnelConfiguration)
+ tableView.reloadData()
+ }
+
+ func tunnelEditingCancelled() {
+ // Nothing to do
+ }
+}