the return@asUncancelableObservable hurts my eyes
# getting-started
u
the return@asUncancelableObservable hurts my eyes
b
hard to say without the full code, but what about a : messageRepository.messageById(messageId)?.apply { … }
(edited, added the ? before .apply)
k
Something like this could work as well, but doesn't look better imho:
Copy code
fun editMessage2(channelId: String, messageId: Long, text: String) = asUncancelableObservable foo@{
  val message = messageRepository.messageById(messageId) ?: return@foo
u
@kartoffelsup yay!