Commit dbf6b282 authored by Jose Blaya's avatar Jose Blaya
Browse files

Reload Trusted networks list when opening the app

parent 5834ac6e
......@@ -36,6 +36,7 @@ class TrustedNetworksViewController: AutolayoutViewController {
}
override func viewDidLoad() {
super.viewDidLoad()
self.title = L10n.Settings.Hotspothelper.title
self.hotspotHelper = PIAHotspotHelper(withDelegate: self)
......@@ -43,6 +44,9 @@ class TrustedNetworksViewController: AutolayoutViewController {
self.switchWiFiProtection.addTarget(self, action: #selector(toggleUseWiFiProtection(_:)), for: .valueChanged)
self.switchCellularData.addTarget(self, action: #selector(toggleCellularData(_:)), for: .valueChanged)
let nc = NotificationCenter.default
nc.addObserver(self, selector: #selector(filterAvailableNetworks), name: .UIApplicationDidBecomeActive, object: nil)
configureTableView()
}
......@@ -102,7 +106,7 @@ class TrustedNetworksViewController: AutolayoutViewController {
filterAvailableNetworks()
}
private func filterAvailableNetworks() {
@objc private func filterAvailableNetworks() {
self.availableNetworks = Client.preferences.availableNetworks
self.trustedNetworks = Client.preferences.trustedNetworks
self.availableNetworks = self.availableNetworks.filter { !self.trustedNetworks.contains($0) }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment