Skip to content

Commit

Permalink
Handle that colorPalette in Dark theme contains non String values
Browse files Browse the repository at this point in the history
  • Loading branch information
Walingar committed Oct 11, 2023
1 parent 3c38511 commit e92d892
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ object BridgePaletteMapperFactory : PaletteMapperFactory() {

val bean = uiTheme.describe()

val iconColorPalette = bean.colorPalette
// TODO: in New UI + Dark theme values can be non String, but IJColorUIResource
// since these are deserialized values simply casted to Map<String, String>.
// Let's handle it while it is not fixed in platform
val iconColorPalette = (bean.colorPalette as Map<String, Any?>).mapValues {
when (val value = it.value) {
is String -> value
else -> null
}
}
val keyPalette = UITheme.getColorPalette()
val themeColors = bean.colors

Expand Down

0 comments on commit e92d892

Please sign in to comment.