aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Tunnel/TunnelErrors.swift
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-21 18:50:32 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-21 18:50:32 +0100
commitec031b1f19c7b85b52ef478b8dfe3f8e173cf046 (patch)
treec8c6e394d51a8c977c0f3b73f4389755a4fa4842 /WireGuard/WireGuard/Tunnel/TunnelErrors.swift
parentUpdated NETunnelProvider save format (diff)
downloadwireguard-apple-ec031b1f19c7b85b52ef478b8dfe3f8e173cf046.tar.xz
wireguard-apple-ec031b1f19c7b85b52ef478b8dfe3f8e173cf046.zip
Get rid of superflous isActivateOnDemandEnabled key
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelErrors.swift12
1 files changed, 6 insertions, 6 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelErrors.swift b/WireGuard/WireGuard/Tunnel/TunnelErrors.swift
index c3d15b2..9b2b574 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelErrors.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelErrors.swift
@@ -51,15 +51,15 @@ enum TunnelsManagerActivationAttemptError: WireGuardAppError {
}
enum TunnelsManagerActivationError: WireGuardAppError {
- case activationFailed
- case activationFailedWithExtensionError(title: String, message: String)
+ case activationFailed(wasOnDemandEnabled: Bool)
+ case activationFailedWithExtensionError(title: String, message: String, wasOnDemandEnabled: Bool)
var alertText: AlertText {
switch self {
- case .activationFailed:
- return (tr("alertTunnelActivationFailureTitle"), tr("alertTunnelActivationFailureMessage"))
- case .activationFailedWithExtensionError(let title, let message):
- return (title, message)
+ case .activationFailed(let wasOnDemandEnabled):
+ return (tr("alertTunnelActivationFailureTitle"), tr("alertTunnelActivationFailureMessage") + (wasOnDemandEnabled ? tr("alertTunnelActivationFailureOnDemandAddendum") : ""))
+ case .activationFailedWithExtensionError(let title, let message, let wasOnDemandEnabled):
+ return (title, message + (wasOnDemandEnabled ? tr("alertTunnelActivationFailureOnDemandAddendum") : ""))
}
}
}