fix(apple): Ensure fetching resource state if already connected (#10567)

Fixes an issue where the Resources menu would not populate when
launching
the app while already connected by ensuring the initial VPN status
triggers the resource loading handler.


Fixes #9837
This commit is contained in:
Mariusz Klochowicz
2025-10-15 10:25:02 +10:30
committed by GitHub
parent df601be538
commit 8378819621
2 changed files with 9 additions and 1 deletions

View File

@@ -107,7 +107,11 @@ public final class Store: ObservableObject {
try await self?.handleVPNStatusChange(newVPNStatus: status)
}
try ipcClient().subscribeToVPNStatusUpdates(handler: vpnStatusChangeHandler)
self.vpnStatus = try ipcClient().sessionStatus()
let initialStatus = try ipcClient().sessionStatus()
// Handle initial status to ensure resources start loading if already connected
try await handleVPNStatusChange(newVPNStatus: initialStatus)
}
private func handleVPNStatusChange(newVPNStatus: NEVPNStatus) async throws {

View File

@@ -32,6 +32,10 @@ export default function Apple() {
<ChangeItem pull="10533">
Improves reliability by caching DNS responses as per their TTL.
</ChangeItem>
<ChangeItem pull="10567">
Fixes an issue where the Resources menu would not populate when
launching the app while already connected.
</ChangeItem>
</Unreleased>
<Entry version="1.5.8" date={new Date("2025-09-10")}>
<ChangeItem pull="10313">