Skip to content

Commit

Permalink
ui: fix refreshing vpn apps
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Aug 12, 2021
1 parent e7cd6cc commit 94a9a01
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Jitterbug/DeviceDetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ struct DeviceDetailsView: View {
}.disabled(!host.isConnected)
}
}.onAppear {
if main.localHost == host {
if main.hasLocalDeviceSupport && !main.isTunnelStarted {
main.startTunnel()
}
if main.localHost == host && main.hasLocalDeviceSupport && !main.isTunnelStarted {
main.startTunnel()
} else {
// BUG: sometimes SwiftUI doesn't like this...
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1)) {
Expand Down

0 comments on commit 94a9a01

Please sign in to comment.