mirror of
https://github.com/smyalygames/vegan-e-numbers.git
synced 2025-05-18 17:04:14 +02:00
feat(app): add animation for menu/back button on search
This commit is contained in:
parent
ab932f5293
commit
2880d57cc6
@ -13,6 +13,7 @@ class ListScreenModel : StateScreenModel<ListScreenModel.State>(State.Loading) {
|
|||||||
object Loading : State()
|
object Loading : State()
|
||||||
data class Result(val eNumbers: List<EGroup>) : State()
|
data class Result(val eNumbers: List<EGroup>) : State()
|
||||||
}
|
}
|
||||||
|
private lateinit var eNumbers: List<EGroup>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads JSON file containing all e numbers
|
* Reads JSON file containing all e numbers
|
||||||
@ -25,7 +26,7 @@ class ListScreenModel : StateScreenModel<ListScreenModel.State>(State.Loading) {
|
|||||||
mutableState.value = State.Loading
|
mutableState.value = State.Loading
|
||||||
|
|
||||||
val bytes = readBytes("files/enumbers.json")
|
val bytes = readBytes("files/enumbers.json")
|
||||||
val eNumbers = Json.decodeFromString<List<EGroup>>(bytes.decodeToString())
|
eNumbers = Json.decodeFromString<List<EGroup>>(bytes.decodeToString())
|
||||||
|
|
||||||
mutableState.value = State.Result(eNumbers = eNumbers)
|
mutableState.value = State.Result(eNumbers = eNumbers)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user