File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Coder-Desktop/Coder-Desktop Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,7 @@ class AppState: ObservableObject {
2525 }
2626 }
2727
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
3429
3530 static let defaultHostnameSuffix : String = " coder "
3631
@@ -105,10 +100,6 @@ class AppState: ObservableObject {
105100 self . onChange = onChange
106101 keychain = Keychain ( service: Bundle . main. bundleIdentifier!)
107102 _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- )
112103 _baseAccessURL = Published (
113104 initialValue: persistent ? UserDefaults . standard. url ( forKey: Keys . baseAccessURL) : nil
114105 )
@@ -127,6 +118,7 @@ class AppState: ObservableObject {
127118 token: sessionToken!,
128119 headers: useLiteralHeaders ? literalHeaders. map { $0. toSDKHeader ( ) } : [ ]
129120 )
121+ Task { await refreshDeploymentConfig ( ) }
130122 }
131123 }
132124
@@ -139,6 +131,7 @@ class AppState: ObservableObject {
139131 token: sessionToken,
140132 headers: useLiteralHeaders ? literalHeaders. map { $0. toSDKHeader ( ) } : [ ]
141133 )
134+ Task { await refreshDeploymentConfig ( ) }
142135 reconfigure ( )
143136 }
144137
You can’t perform that action at this time.
0 commit comments