Commit 23675101 authored by Setako's avatar Setako

[Fix] Config refresh type lost

parent 489066a1
...@@ -76,8 +76,8 @@ class ReactantConfigService( ...@@ -76,8 +76,8 @@ class ReactantConfigService(
override fun <T : Any> refresh(config: Config<T>): Completable { override fun <T : Any> refresh(config: Config<T>): Completable {
if (config !is ConfigImpl<*>) throw IllegalArgumentException("Not a correct config") if (config !is ConfigImpl<*>) throw IllegalArgumentException("Not a correct config")
val loadResult = val loadResult =
if (config.modelType != null) loadContent(config.parser, config.content::class as KClass<T>, config.path) if (config.modelType != null) loadContent(config.parser, config.modelType!!, config.path)
else loadContent(config.parser, config.modelType!!, config.path) else loadContent(config.parser, config.content::class as KClass<T>, config.path)
return loadResult return loadResult
.doOnSuccess { content -> (config as ConfigImpl).content = content } .doOnSuccess { content -> (config as ConfigImpl).content = content }
.ignoreElement() .ignoreElement()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment