Remove the need for a map in the default config
This commit is contained in:
parent
5c3f606d26
commit
0427c2bce0
|
@ -52,9 +52,6 @@ object Configuration {
|
||||||
"""
|
"""
|
||||||
|Snowy {
|
|Snowy {
|
||||||
| displayInitMessage = true
|
| displayInitMessage = true
|
||||||
| enabledFeatures {
|
|
||||||
| GammaBoost = false
|
|
||||||
| }
|
|
||||||
|}
|
|}
|
||||||
""".trimMargin()
|
""".trimMargin()
|
||||||
)
|
)
|
||||||
|
@ -64,7 +61,9 @@ object Configuration {
|
||||||
writeConfig(it)
|
writeConfig(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val enabledFeatures = obtained.extract<MutableMap<String, Boolean>>("enabledFeatures") // TODO Put enabledFeatures in the obtained config to save the toggled buttons
|
val enabledFeatures: MutableMap<String, Boolean> = if (obtained.hasPath("enabledFeatures")) {
|
||||||
|
obtained.extract("enabledFeatures")
|
||||||
|
} else mutableMapOf()
|
||||||
init {
|
init {
|
||||||
Runtime.getRuntime().addShutdownHook(
|
Runtime.getRuntime().addShutdownHook(
|
||||||
Thread {
|
Thread {
|
||||||
|
|
Loading…
Reference in New Issue