onSuccessUI

fun onSuccessUI(action: (ResultT) -> Unit): Task<ResultT>

Experimental callback to avoid letting switch threads, Also allow a chance to perform UI and background jobs after a task is done without dealing with multithreading

callApi().onSuccess {
// do background logic , call another api
}.onSuccessUI {
// do UI logic , update TextViews ..etc
}