File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/main/kotlin/com/coder/toolbox Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -262,9 +262,7 @@ class CoderRemoteProvider(
262262 // start initialization with the new settings
263263 this @CoderRemoteProvider.client = restClient
264264 coderHeaderPage = NewEnvironmentPage (context, context.i18n.pnotr(restClient.url.toString()))
265- environments.update {
266- LoadableState .Loading
267- }
265+ environments.showLoadingMessage()
268266 pollJob = poll(restClient, cli)
269267 }
270268 }
@@ -329,11 +327,14 @@ class CoderRemoteProvider(
329327 context.secrets.rememberMe = true
330328 this .client = client
331329 pollJob?.cancel()
330+ environments.showLoadingMessage()
331+ pollJob = poll(client, cli)
332+ goToEnvironmentsPage()
333+ }
332334
333- environments.update {
335+ private fun MutableStateFlow<LoadableState<List<RemoteProviderEnvironment>>>.showLoadingMessage () {
336+ this .update {
334337 LoadableState .Loading
335338 }
336- pollJob = poll(client, cli)
337- goToEnvironmentsPage()
338339 }
339340}
You can’t perform that action at this time.
0 commit comments