Remove the need for a map in the default config

This commit is contained in:
Username404-59 2021-05-03 20:29:54 +02:00
parent 5c3f606d26
commit 0427c2bce0
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 4 deletions

View File

@ -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 {