Icaro Temponi
11/19/2018, 7:30 PMsuspendCoroutine version without return type, that would allow me to just call resume(). Currently, i'm using the following when ignoring the result:
suspend fun <T : AppCompatActivity> T.awaitRunOnUi(fn: T.() -> Unit) {
suspendCoroutine<Any> { continuation ->
runOnUiThread {
fn()
continuation.resume(0)
}
}
}
Getting rid of the <Any> and the 0 (or anything else) on the resume would be nice for lazy people like me xD.