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(
377377
378378 private fun shouldDoAutoSetup (): Boolean = firstRun && context.secrets.rememberMe == true
379379
380- private suspend fun onConnect (client : CoderRestClient , cli : CoderCLIManager ) {
380+ private fun onConnect (client : CoderRestClient , cli : CoderCLIManager ) {
381381 // Store the URL and token for use next time.
382382 context.secrets.lastDeploymentURL = client.url.toString()
383383 context.secrets.lastToken = client.token ? : " "
@@ -387,9 +387,8 @@ class CoderRemoteProvider(
387387 this .client = client
388388 pollJob?.cancel()
389389 environments.showLoadingMessage()
390- coderHeaderPage = NewEnvironmentPage (context.i18n.pnotr(client.url.toString()))
390+ coderHeaderPage.setTitle (context.i18n.pnotr(client.url.toString()))
391391 pollJob = poll(client, cli)
392- context.refreshMainPage()
393392 }
394393
395394 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
77import com.jetbrains.toolbox.api.ui.actions.RunnableActionDescription
88import com.jetbrains.toolbox.api.ui.components.UiPage
99import kotlinx.coroutines.flow.MutableStateFlow
10+ import kotlinx.coroutines.flow.update
1011
1112/* *
1213 * Base page that handles the icon, displaying error notifications, and
@@ -23,6 +24,12 @@ abstract class CoderPage(
2324 showIcon : Boolean = true ,
2425) : UiPage(titleObservable) {
2526
27+ fun setTitle (title : LocalizableString ) {
28+ titleObservable.update {
29+ title
30+ }
31+ }
32+
2633 /* *
2734 * Return the icon, if showing one.
2835 *
You can’t perform that action at this time.
0 commit comments