Skip to content

Commit 95a86ca

Browse files
committed
Compute ColorScheme on load
1 parent a7f2d94 commit 95a86ca

File tree

1 file changed

+4
-4
lines changed
  • core/src/main/kotlin/io/github/rothes/esu/core/colorscheme

1 file changed

+4
-4
lines changed

core/src/main/kotlin/io/github/rothes/esu/core/colorscheme/ColorScheme.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ data class ColorScheme(
3030
val errorDim: TextColor = hex("#ff5050"),
3131
): ConfigurationPart {
3232

33+
@Transient
3334
@Suppress("SpellCheckingInspection")
34-
private val colors by lazy {
35+
private val colors =
3536
listOf(
3637
primary to "pc",
3738
primaryDim to "pdc",
@@ -46,10 +47,10 @@ data class ColorScheme(
4647
error to "ec",
4748
errorDim to "edc",
4849
)
49-
}
5050

51+
@Transient
5152
@Suppress("SpellCheckingInspection")
52-
val tagResolver: TagResolver by lazy {
53+
val tagResolver: TagResolver =
5354
TagResolver.builder()
5455
.color(primary, "pc", "primary_color")
5556
.color(primaryDim, "pdc", "primary_dim_color")
@@ -65,7 +66,6 @@ data class ColorScheme(
6566
.color(errorDim, "edc", "error_dim_color")
6667
.resolver(ColorTagResolver())
6768
.build()
68-
}
6969

7070
private fun TagResolver.Builder.color(color: TextColor, vararg keys: String): TagResolver.Builder {
7171
resolver(EsuColorTagResolver(keys.toList(), color))

0 commit comments

Comments
 (0)