From f07c9bf105509cc9eef6fbfa35245f5892f2c14b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 22 Mar 2022 14:40:53 +0100 Subject: [PATCH] Fix compilation warning (exhaustive when) --- .../billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt index 96b5a9c997..e3c4004fb5 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerEpoxyController.kt @@ -20,7 +20,6 @@ import android.content.Context import android.view.View import com.airbnb.epoxy.TypedEpoxyController import com.airbnb.mvrx.Fail -import com.airbnb.mvrx.Success import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence import me.gujun.android.span.Span import me.gujun.android.span.span @@ -44,10 +43,8 @@ internal class JSonViewerEpoxyController(private val context: Context) : text(async.error.localizedMessage?.toEpoxyCharSequence()) } } - is Success -> { - val model = data.root.invoke() - - model?.let { + else -> { + async.invoke()?.let { buildRec(it, 0, "") } }