aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-03-08 14:55:08 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-18 06:46:55 +0100
commit574d8433b3402b93352a85f11726adf9e93fbcdd (patch)
treef65f41bcfcb47531e68c0cd6accf3407348bf504 /WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift
parenton-demand: ActivateOnDemandViewModel: Uniquify SSIDs list (diff)
downloadwireguard-apple-574d8433b3402b93352a85f11726adf9e93fbcdd.tar.xz
wireguard-apple-574d8433b3402b93352a85f11726adf9e93fbcdd.zip
on-demand: iOS: Update on-demand info shown in tunnel edit view
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift')
-rw-r--r--WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift b/WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift
index 55da6e0..f38ca6a 100644
--- a/WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift
+++ b/WireGuard/WireGuard/UI/ActivateOnDemandViewModel.swift
@@ -137,6 +137,13 @@ extension ActivateOnDemandViewModel {
#endif
}
}
+
+ func fixSSIDOption() {
+ selectedSSIDs = uniquifiedNonEmptySelectedSSIDs()
+ if selectedSSIDs.isEmpty {
+ ssidOption = .anySSID
+ }
+ }
}
private extension ActivateOnDemandViewModel {