From 0427c2bce0f9137def7a58fdc842b6c4defaf4f0 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Mon, 3 May 2021 20:29:54 +0200 Subject: [PATCH] Remove the need for a map in the default config --- .../kotlin/fr/username404/snowygui/config/Configuration.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt index 38ac89b..9b730eb 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt @@ -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>("enabledFeatures") // TODO Put enabledFeatures in the obtained config to save the toggled buttons + val enabledFeatures: MutableMap = if (obtained.hasPath("enabledFeatures")) { + obtained.extract("enabledFeatures") + } else mutableMapOf() init { Runtime.getRuntime().addShutdownHook( Thread {