File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
src/main/kotlin/com/coder/toolbox Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ class CoderRemoteProvider(
377
377
378
378
private fun shouldDoAutoSetup (): Boolean = firstRun && context.secrets.rememberMe == true
379
379
380
- private suspend fun onConnect (client : CoderRestClient , cli : CoderCLIManager ) {
380
+ private fun onConnect (client : CoderRestClient , cli : CoderCLIManager ) {
381
381
// Store the URL and token for use next time.
382
382
context.secrets.lastDeploymentURL = client.url.toString()
383
383
context.secrets.lastToken = client.token ? : " "
@@ -387,9 +387,8 @@ class CoderRemoteProvider(
387
387
this .client = client
388
388
pollJob?.cancel()
389
389
environments.showLoadingMessage()
390
- coderHeaderPage = NewEnvironmentPage (context.i18n.pnotr(client.url.toString()))
390
+ coderHeaderPage.setTitle (context.i18n.pnotr(client.url.toString()))
391
391
pollJob = poll(client, cli)
392
- context.refreshMainPage()
393
392
}
394
393
395
394
private fun MutableStateFlow<LoadableState<List<CoderRemoteEnvironment>>>.showLoadingMessage () {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import com.jetbrains.toolbox.api.localization.LocalizableString
7
7
import com.jetbrains.toolbox.api.ui.actions.RunnableActionDescription
8
8
import com.jetbrains.toolbox.api.ui.components.UiPage
9
9
import kotlinx.coroutines.flow.MutableStateFlow
10
+ import kotlinx.coroutines.flow.update
10
11
11
12
/* *
12
13
* Base page that handles the icon, displaying error notifications, and
@@ -23,6 +24,12 @@ abstract class CoderPage(
23
24
showIcon : Boolean = true ,
24
25
) : UiPage(titleObservable) {
25
26
27
+ fun setTitle (title : LocalizableString ) {
28
+ titleObservable.update {
29
+ title
30
+ }
31
+ }
32
+
26
33
/* *
27
34
* Return the icon, if showing one.
28
35
*
You can’t perform that action at this time.
0 commit comments