aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift16
1 files changed, 9 insertions, 7 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
index 395eeb4f..efb3fd74 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
@@ -219,14 +219,16 @@ class TunnelEditViewController: NSViewController {
}
} else {
// We're creating a new tunnel
- tunnelsManager.add(tunnelConfiguration: tunnelConfiguration, activateOnDemandSetting: onDemandSetting) { [weak self] result in
- if let error = result.error {
- ErrorPresenter.showErrorAlert(error: error, from: self)
- return
+ AppStorePrivacyNotice.show(from: self, into: tunnelsManager) { [weak self] in
+ self?.tunnelsManager.add(tunnelConfiguration: tunnelConfiguration, activateOnDemandSetting: onDemandSetting) { [weak self] result in
+ if let error = result.error {
+ ErrorPresenter.showErrorAlert(error: error, from: self)
+ return
+ }
+ let tunnel: TunnelContainer = result.value!
+ self?.dismiss(self)
+ self?.delegate?.tunnelSaved(tunnel: tunnel)
}
- let tunnel: TunnelContainer = result.value!
- self?.dismiss(self)
- self?.delegate?.tunnelSaved(tunnel: tunnel)
}
}
}