codelab-kotlin-coroutines icon indicating copy to clipboard operation
codelab-kotlin-coroutines copied to clipboard

Mistake in lab Section5. Controlling the UI with coroutines.

Open aleontsev opened this issue 5 years ago • 0 comments
trafficstars

/**
* Wait one second then update the tap count.
*/
private fun updateTaps() {
   // TODO: Convert updateTaps to use coroutines
   tapCount++
   BACKGROUND.submit {
       Thread.sleep(1_000)
       _taps.postValue("$tapCount taps")
   }
}

".... One second after the user clicks the main view, it requests a snackbar. " Shoul be "One second after the user clicks the main view, it updates number of taps. "

aleontsev avatar Apr 21 '20 13:04 aleontsev