@@ -30,7 +30,6 @@ class ConnectionViewViewModel: ObservableObject {
30
30
@Published private( set) var tunnelStatus : TunnelStatus
31
31
@Published var outgoingConnectionInfo : OutgoingConnectionInfo ?
32
32
@Published var showsActivityIndicator = false
33
- @Published var showsConnectionDetails = false
34
33
35
34
@Published var relayConstraints : RelayConstraints
36
35
let destinationDescriber : DestinationDescribing
@@ -73,14 +72,15 @@ class ConnectionViewViewModel: ObservableObject {
73
72
74
73
func update( tunnelStatus: TunnelStatus ) {
75
74
self . tunnelStatus = tunnelStatus
76
- self . showsConnectionDetails = shouldShowConnectionDetails ( tunnelStatus)
77
75
78
76
if !tunnelIsConnected {
79
77
outgoingConnectionInfo = nil
80
78
}
81
79
}
80
+ }
82
81
83
- private func shouldShowConnectionDetails( _ tunnelStatus: TunnelStatus ) -> Bool {
82
+ extension ConnectionViewViewModel {
83
+ var showsConnectionDetails : Bool {
84
84
switch tunnelStatus. state {
85
85
case . connecting, . reconnecting, . negotiatingEphemeralPeer,
86
86
. connected, . pendingReconnect:
@@ -89,9 +89,7 @@ class ConnectionViewViewModel: ObservableObject {
89
89
false
90
90
}
91
91
}
92
- }
93
92
94
- extension ConnectionViewViewModel {
95
93
var textColorForSecureLabel : UIColor {
96
94
switch tunnelStatus. state {
97
95
case . connecting, . reconnecting, . waitingForConnectivity( . noConnection) , . negotiatingEphemeralPeer,
0 commit comments