Commit 91083e51 authored by Jose Blaya's avatar Jose Blaya
Browse files

Fix reset NMT settings

parent 228b2b7c
......@@ -373,6 +373,16 @@ class SettingsViewController: AutolayoutViewController {
let savedServer = pendingPreferences.preferredServer
pendingPreferences.reset()
pendingPreferences.preferredServer = savedServer
// reset NMT preferences
let preferences = Client.preferences.editable()
preferences.trustedNetworks = pendingPreferences.trustedNetworks
preferences.availableNetworks = pendingPreferences.availableNetworks
preferences.shouldConnectForAllNetworks = pendingPreferences.shouldConnectForAllNetworks
preferences.useWiFiProtection = pendingPreferences.useWiFiProtection
preferences.trustCellularData = pendingPreferences.trustCellularData
preferences.commit()
guard let currentOpenVPNConfiguration = pendingPreferences.vpnCustomConfiguration(for: PIATunnelProfile.vpnType) as? PIATunnelProvider.Configuration else {
fatalError("No default VPN custom configuration provided for PIA protocol")
}
......
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