Skip to content

Commit 63befc5

Browse files
committed
clear menustate on start
1 parent 060d932 commit 63befc5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Coder Desktop/Coder Desktop/VPNMenuState.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ struct VPNMenuState {
104104

105105
mutating func upsertWorkspace(_ workspace: Vpn_Workspace) {
106106
guard let wsID = UUID(uuidData: workspace.id) else { return }
107-
workspaces[wsID] = Workspace(id: wsID, name: workspace.name, agents: [])
107+
// Workspace names are unique & case-insensitive, and we want to show offline workspaces
108+
// with a valid hostname (lowercase).
109+
workspaces[wsID] = Workspace(id: wsID, name: workspace.name.lowercased(), agents: [])
108110
// Check if we can associate any invalid agents with this workspace
109111
invalidAgents.filter { agent in
110112
agent.workspaceID == workspace.id

Coder Desktop/Coder Desktop/VPNService.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ final class CoderVPNService: NSObject, VPNService {
9090
return
9191
}
9292

93+
menuState.clear()
9394
await startTunnel()
9495
logger.debug("network extension enabled")
9596
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy