Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1cbe9ed

Browse files
committed
fix: jump to main page after coder setup is successful
We still need to switch from the coder setup page back to the main screen once the coder cli and the rest api poller is initialized.
1 parent 3283ab6 commit 1cbe9ed

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class CoderRemoteProvider(
167167
close()
168168
// force auto-login
169169
firstRun = true
170-
goToEnvironmentsPage()
170+
context.envPageManager.showPluginEnvironmentsPage()
171171
break
172172
}
173173
}
@@ -324,18 +324,6 @@ class CoderRemoteProvider(
324324
}
325325
}
326326

327-
/**
328-
* Make Toolbox ask for the page again. Use any time we need to change the
329-
* root page (for example, sign-in or the environment list).
330-
*
331-
* When moving between related pages, instead use ui.showUiPage() and
332-
* ui.hideUiPage() which stacks and has built-in back navigation, rather
333-
* than using multiple root pages.
334-
*/
335-
private fun goToEnvironmentsPage() {
336-
context.envPageManager.showPluginEnvironmentsPage()
337-
}
338-
339327
/**
340328
* Return the sign-in page if we do not have a valid client.
341329
@@ -389,6 +377,7 @@ class CoderRemoteProvider(
389377
environments.showLoadingMessage()
390378
coderHeaderPage.setTitle(context.i18n.pnotr(client.url.toString()))
391379
pollJob = poll(client, cli)
380+
context.envPageManager.showPluginEnvironmentsPage()
392381
}
393382

394383
private fun MutableStateFlow<LoadableState<List<CoderRemoteEnvironment>>>.showLoadingMessage() {

0 commit comments

Comments
 (0)