diff --git a/composeApp/src/commonMain/kotlin/tab/list/ListScreenModel.kt b/composeApp/src/commonMain/kotlin/tab/list/ListScreenModel.kt index 7af8fc7..46c1b43 100644 --- a/composeApp/src/commonMain/kotlin/tab/list/ListScreenModel.kt +++ b/composeApp/src/commonMain/kotlin/tab/list/ListScreenModel.kt @@ -13,6 +13,7 @@ class ListScreenModel : StateScreenModel(State.Loading) { object Loading : State() data class Result(val eNumbers: List) : State() } + private lateinit var eNumbers: List /** * Reads JSON file containing all e numbers @@ -25,7 +26,7 @@ class ListScreenModel : StateScreenModel(State.Loading) { mutableState.value = State.Loading val bytes = readBytes("files/enumbers.json") - val eNumbers = Json.decodeFromString>(bytes.decodeToString()) + eNumbers = Json.decodeFromString>(bytes.decodeToString()) mutableState.value = State.Result(eNumbers = eNumbers) }