Skip to content

Commit

Permalink
Addresses PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Dec 20, 2024
1 parent 5890980 commit 75ac9b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ private extension Image {
static let controlCenterBottom = Image("ControlCenterBottom")
}

/*

@available(iOS 18.0, *)
struct ControlCenterWidgetEducationView_Previews: PreviewProvider {
static var previews: some View {
ControlCenterWidgetEducationView(navBarTitle: "Control Center")
ControlCenterWidgetEducationView(navBarTitle: "Control Center", widget: .vpnToggle)
}
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ public struct VPNWidgetTunnelController: Sendable {

private func awaitUntilStatusIsNoLongerTransitioning(manager: NETunnelProviderManager) async throws {

let start = Date()

while true {
try await Task.sleep(for: .milliseconds(500))

if manager.connection.status != .connecting
&& manager.connection.status != .disconnecting {
if start.timeIntervalSinceNow > 30
|| (manager.connection.status != .connecting && manager.connection.status != .disconnecting) {

break
}
Expand Down

0 comments on commit 75ac9b3

Please sign in to comment.