Commit 7cd40441 authored by Leonardo Aramaki's avatar Leonardo Aramaki

A bit of refactoring

parent a739a997
......@@ -132,7 +132,8 @@ class PinnedMessagesAdapter(private val serverUrl: String) : RecyclerView.Adapte
}
}
private fun bindUserAvatar(message: MessageViewModel, drawee: SimpleDraweeView, imageUnknownAvatar: ImageView) = message.getAvatarUrl(serverUrl).let {
private fun bindUserAvatar(message: MessageViewModel, drawee: SimpleDraweeView, imageUnknownAvatar: ImageView) {
message.getAvatarUrl(serverUrl).let {
drawee.setImageURI(it.toString())
drawee.setVisible(true)
imageUnknownAvatar.setVisible(false)
......@@ -141,4 +142,5 @@ class PinnedMessagesAdapter(private val serverUrl: String) : RecyclerView.Adapte
imageUnknownAvatar.setVisible(true)
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment