VPN: Refresh tunnel statuses when app gets to the foreground
Because the tunnel could've be activated from iOS Settings now
This commit is contained in:
parent
fc93ca65a5
commit
9568c7f980
|
@ -37,4 +37,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
mainVC?.tunnelsListVC?.importFromFile(url: url)
|
mainVC?.tunnelsListVC?.importFromFile(url: url)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||||
|
mainVC?.tunnelsListVC?.refreshTunnelConnectionStatuses()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,6 +223,16 @@ class TunnelsListTableViewController: UIViewController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func refreshTunnelConnectionStatuses() {
|
||||||
|
if let tunnelsManager = tunnelsManager {
|
||||||
|
tunnelsManager.refreshConnectionStatuses()
|
||||||
|
} else {
|
||||||
|
onTunnelsManagerReady = { tunnelsManager in
|
||||||
|
tunnelsManager.refreshConnectionStatuses()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: UIDocumentPickerDelegate
|
// MARK: UIDocumentPickerDelegate
|
||||||
|
|
Loading…
Reference in New Issue