Fix RIDER-111487: choose the correct color scheme by default

GitOrigin-RevId: 27876ad65ce63e113c2a0020d9fed83bbd8e271b
This commit is contained in:
Ivan Migalev
2024-04-30 19:43:04 +02:00
committed by intellij-monorepo-bot
parent 01b6876bec
commit 6e5180b8b6
3 changed files with 5 additions and 1 deletions

View File

@@ -73,6 +73,7 @@ interface ThemeService {
var currentTheme: Theme
val schemesList: List<WizardScheme>
val initialSchemeId: String?
fun onStepEnter(isForwardDirection: Boolean)
fun updateScheme(schemeId: String)

View File

@@ -72,6 +72,7 @@ class ThemeServiceImpl : ThemeService {
}
override val schemesList: List<WizardScheme> = map.values.toList()
override val initialSchemeId: String? = null
override fun onStepEnter(isForwardDirection: Boolean) {}

View File

@@ -98,7 +98,9 @@ class ThemeChooserPage(val controller: WizardController) : OnboardingPage {
border = UiUtils.CARD_BORDER
}
activeScheme = pages[0]
activeScheme = service.initialSchemeId?.let { initialId ->
pages.firstOrNull { it.scheme.id == initialId }
} ?: pages[0]
activePane(activeScheme)
val backAction = controller.goBackAction?.let {