File tree 1 file changed +3
-10
lines changed
Coder-Desktop/Coder-Desktop
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,7 @@ class AppState: ObservableObject {
25
25
}
26
26
}
27
27
28
- @Published private( set) var hostnameSuffix : String {
29
- didSet {
30
- guard persistent else { return }
31
- UserDefaults . standard. set ( hostnameSuffix, forKey: Keys . hostnameSuffix)
32
- }
33
- }
28
+ @Published private( set) var hostnameSuffix : String = defaultHostnameSuffix
34
29
35
30
static let defaultHostnameSuffix : String = " coder "
36
31
@@ -105,10 +100,6 @@ class AppState: ObservableObject {
105
100
self . onChange = onChange
106
101
keychain = Keychain ( service: Bundle . main. bundleIdentifier!)
107
102
_hasSession = Published ( initialValue: persistent ? UserDefaults . standard. bool ( forKey: Keys . hasSession) : false )
108
- _hostnameSuffix = Published (
109
- initialValue: persistent ? UserDefaults . standard
110
- . string ( forKey: Keys . hostnameSuffix) ?? Self . defaultHostnameSuffix : Self . defaultHostnameSuffix
111
- )
112
103
_baseAccessURL = Published (
113
104
initialValue: persistent ? UserDefaults . standard. url ( forKey: Keys . baseAccessURL) : nil
114
105
)
@@ -127,6 +118,7 @@ class AppState: ObservableObject {
127
118
token: sessionToken!,
128
119
headers: useLiteralHeaders ? literalHeaders. map { $0. toSDKHeader ( ) } : [ ]
129
120
)
121
+ Task { await refreshDeploymentConfig ( ) }
130
122
}
131
123
}
132
124
@@ -139,6 +131,7 @@ class AppState: ObservableObject {
139
131
token: sessionToken,
140
132
headers: useLiteralHeaders ? literalHeaders. map { $0. toSDKHeader ( ) } : [ ]
141
133
)
134
+ Task { await refreshDeploymentConfig ( ) }
142
135
reconfigure ( )
143
136
}
144
137
You can’t perform that action at this time.
0 commit comments