Greg Stepniewski
02/05/2018, 1:44 PMasync(UI) {
delay(10)
viewState.onNext(...)
}
I guess an alternative to delay would be bg { Thread.sleep(10) }
?louiscad
02/05/2018, 1:49 PMlaunch(UI)
in your case instead of async(UI)
. async
creates a Deferred
on which you're meant to call await()
at some point. And it is not the same, because the Thread.sleep(...)
blocks the thread (rendering it useless for the passed time), while delay
is more like handler.postDelayed(...)