aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS/ViewController
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-15 01:06:44 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-15 01:14:14 +0100
commitfcca2d4fec803e40c999c3dcb4d2925ebf59c01a (patch)
treeca4898832961fc3994f71ac615422d2acde51760 /WireGuard/WireGuard/UI/macOS/ViewController
parentVersion bump (diff)
downloadwireguard-apple-fcca2d4fec803e40c999c3dcb4d2925ebf59c01a.tar.xz
wireguard-apple-fcca2d4fec803e40c999c3dcb4d2925ebf59c01a.zip
macOS: Show privacy notice on adding first tunnel0.0.20190207-3
App store reviewers don't understand that this isn't a service. Revert this as soon as they come to their senses. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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 395eeb4..efb3fd7 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)
}
}
}