Skip to content

Commit 56d7e1f

Browse files
committed
remove two stages
1 parent 5936021 commit 56d7e1f

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

Coder-Desktop/Coder-Desktop/VPN/VPNProgress.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct VPNProgressView: View {
4242
}
4343
switch progress.stage {
4444
case .initial:
45-
return 0.05
45+
return 0
4646
case .downloading:
4747
guard let downloadProgress = progress.downloadProgress else {
4848
// We can't make this illegal state unrepresentable because XPC
@@ -52,15 +52,11 @@ struct VPNProgressView: View {
5252
// 40MB if the server doesn't give us the expected size
5353
let totalBytes = downloadProgress.totalBytesToWrite ?? 40_000_000
5454
let downloadPercent = min(1.0, Float(downloadProgress.totalBytesWritten) / Float(totalBytes))
55-
return 0.05 + 0.4 * downloadPercent
55+
return 0.4 * downloadPercent
5656
case .validating:
57-
return 0.42
57+
return 0.43
5858
case .removingQuarantine:
59-
return 0.44
60-
case .opening:
6159
return 0.46
62-
case .settingUpTunnel:
63-
return 0.48
6460
case .startingTunnel:
6561
return 0.50
6662
}

Coder-Desktop/VPN/Manager.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ actor Manager {
6767
// so it's safe to execute. However, the SE must be sandboxed, so we defer to the app.
6868
try await removeQuarantine(dest)
6969

70-
pushProgress(stage: .opening)
7170
do {
7271
try tunnelHandle = TunnelHandle(dylibPath: dest)
7372
} catch {
7473
throw .tunnelSetup(error)
7574
}
76-
pushProgress(stage: .settingUpTunnel)
7775
speaker = await Speaker<Vpn_ManagerMessage, Vpn_TunnelMessage>(
7876
writeFD: tunnelHandle.writeHandle,
7977
readFD: tunnelHandle.readHandle

Coder-Desktop/VPNLib/XPC.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import Foundation
1919
case downloading
2020
case validating
2121
case removingQuarantine
22-
case opening
23-
case settingUpTunnel
2422
case startingTunnel
2523

2624
public var description: String? {
@@ -33,10 +31,6 @@ import Foundation
3331
"Validating library..."
3432
case .removingQuarantine:
3533
"Removing quarantine..."
36-
case .opening:
37-
"Opening library..."
38-
case .settingUpTunnel:
39-
"Setting up tunnel..."
4034
case .startingTunnel:
4135
nil
4236
}

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