Sergio Crespo Toubes
05/09/2019, 1:56 PMfun getPosts(authToken: String): IO<List<Post>>
unsafe {
runBlocking {
fx {
val (posts) = mPostsApi.getPosts(authToken)
showPosts(posts)
}.handleError {
IO(Main) { mView.showGenericErrorAlert() }
}
}
}
Its obligatory to use unsafe and runBlocking? its not a bit dirty code?