Fix VPN status not restored on app launch
Notifications deemed not relevant because currentBundleIdentifier
not set unless connect/reinstate.
Assume initial relevant identifier to be the first notified.
See 7ba41a0e73
This commit is contained in:
parent
87f2ebfd9e
commit
7eec20c75b
|
@ -180,6 +180,12 @@ extension VPNManager {
|
|||
}
|
||||
|
||||
private func onVPNStatus(_ notification: Notification) {
|
||||
|
||||
// assume first notified identifier to be the relevant one
|
||||
// in order to restore VPN status on app launch
|
||||
if currentBundleIdentifier == nil {
|
||||
currentBundleIdentifier = notification.vpnBundleIdentifier
|
||||
}
|
||||
guard isRelevantNotification(notification) else {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue