android / codelab-kotlin-coroutines

Kotlin Coroutines codelab
Apache License 2.0
552 stars 268 forks source link

spinner.value/postValue #107

Open gcottenc opened 4 years ago

gcottenc commented 4 years ago

https://codelabs.developers.google.com/codelabs/kotlin-coroutines/#6

When it gets a result, it clears the loading spinner with _spinner.value = false

->

When it gets a result, it clears the loading spinner with _spinner.postValue(false)

(maybe you like to write why you use postValue, I guess to make sure it's run on the main (UI) thread)