aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-07-28 02:10:45 +0530
committerRoopesh Chander <roop@roopc.net>2021-07-28 03:34:36 +0530
commitabaf1f1454e7e8203ef498f079163da42cfc657a (patch)
treef2052be0dd9dc5fa3735524ae9642a6e2839d32b /Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
parentUI: iOS: Tunnel detail: Incorporate on-demand-ness in 'Status' (diff)
downloadwireguard-apple-abaf1f1454e7e8203ef498f079163da42cfc657a.tar.xz
wireguard-apple-abaf1f1454e7e8203ef498f079163da42cfc657a.zip
UI: Keep on-demand rules even if on-demand is disabled
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift')
-rw-r--r--Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift b/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
index 167feb7..de717a8 100644
--- a/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
+++ b/Sources/WireGuardApp/Tunnel/ActivateOnDemandOption.swift
@@ -46,7 +46,7 @@ extension ActivateOnDemandOption {
}
init(from tunnelProviderManager: NETunnelProviderManager) {
- if tunnelProviderManager.isOnDemandEnabled, let onDemandRules = tunnelProviderManager.onDemandRules {
+ if let onDemandRules = tunnelProviderManager.onDemandRules {
self = ActivateOnDemandOption.create(from: onDemandRules)
} else {
self = .off