Make Configuration.obtained a lazy property
This commit is contained in:
parent
d028baa5d5
commit
d33622b850
|
@ -38,8 +38,7 @@ object Configuration {
|
|||
)
|
||||
}
|
||||
}
|
||||
@JvmField
|
||||
val obtained: Config = run {
|
||||
val obtained: Config by lazy {
|
||||
var result: Config = empty()
|
||||
with(file) {
|
||||
if (!exists()) {
|
||||
|
@ -64,7 +63,7 @@ object Configuration {
|
|||
).extract<Config>("Snowy")
|
||||
}.also {
|
||||
runBlocking {
|
||||
writeConfig(it)
|
||||
writeConfig(it.value)
|
||||
}
|
||||
}
|
||||
val enabledFeatures = mutableMapOf<String, Boolean>().apply {
|
||||
|
|
Loading…
Reference in New Issue