Let VPN always operate on active profile

This commit is contained in:
Davide De Rosa 2020-12-03 00:07:16 +01:00
parent 6b2b3fc59f
commit 5cb72de837
3 changed files with 4 additions and 5 deletions

View File

@ -802,6 +802,9 @@ extension OrganizerViewController: ConnectionServiceDelegate {
IntentDispatcher.donateEnableVPN()
}
}
func connectionService(didUpdate profile: ConnectionProfile) {
}
}
extension OrganizerViewController: UIDocumentPickerDelegate {

View File

@ -81,7 +81,6 @@ class ServiceViewController: UIViewController, StrongTableHost {
func setProfile(_ profile: ConnectionProfile?, reloadingViews: Bool = true) {
self.profile = profile
vpn.profile = profile
if let profile = profile {
title = service.screenTitle(ProfileKey(profile))
@ -228,9 +227,6 @@ class ServiceViewController: UIViewController, StrongTableHost {
private func activateProfile() {
service.activateProfile(uncheckedProfile)
// for vpn methods to work, must update .profile to currently active profile
vpn.profile = uncheckedProfile
vpn.disconnect { (error) in
self.reloadModel()
self.updateViewsIfNeeded()

@ -1 +1 @@
Subproject commit 40985ae93bcc28674a534ed10456ccb431cac877
Subproject commit 4ec43fd23982c52b45511fc3b394766148492049