aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-07-28 02:30:24 +0530
committerRoopesh Chander <roop@roopc.net>2021-07-28 03:35:05 +0530
commit147ac02f0d065e3f68261f2ee7394874ae5d970f (patch)
tree75a219cc219e883537097c454a3edd432f472f18 /Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
parentUI: When reloading tunnels, preserve '.waiting' state (diff)
downloadwireguard-apple-147ac02f0d065e3f68261f2ee7394874ae5d970f.tar.xz
wireguard-apple-147ac02f0d065e3f68261f2ee7394874ae5d970f.zip
UI: iOS: Show on-demand state in 'Status' if there are on-demand rules
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift5
1 files changed, 5 insertions, 0 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
index 675adfd..196de0c 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift
@@ -365,6 +365,11 @@ extension TunnelDetailTableViewController {
cell.switchView.isUserInteractionEnabled = (status == .inactive || status == .active)
cell.isEnabled = (status == .inactive || status == .active)
}
+
+ if tunnel.hasOnDemandRules && !isOnDemandEngaged && status == .inactive {
+ text = tr("tunnelStatusOnDemandDisabled")
+ }
+
cell.textLabel?.text = text
}