Do not confirm trusted policy change while offline

This commit is contained in:
Davide De Rosa 2018-10-23 23:56:53 +02:00
parent ebbba3a713
commit 8375fc58fc
1 changed files with 4 additions and 1 deletions

View File

@ -275,11 +275,14 @@ class ServiceViewController: UIViewController, TableModelHost {
self.vpn.reinstall(completionHandler: nil)
}
}
guard !isOn else {
completionHandler()
return
}
guard vpn.isEnabled else {
completionHandler()
return
}
let alert = Macros.alert(
L10n.Service.Sections.Trusted.header,
L10n.Service.Alerts.Trusted.WillDisconnectPolicy.message