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 {
|
||||
| displayInitMessage = true
|
||||
| enabledFeatures {
|
||||
| GammaBoost = false
|
||||
| }
|
||||
|}
|
||||
""".trimMargin()
|
||||
)
|
||||
|
@ -64,7 +61,9 @@ object Configuration {
|
|||
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 {
|
||||
Runtime.getRuntime().addShutdownHook(
|
||||
Thread {
|
||||
|
|
Loading…
Reference in New Issue