Commit 03a7efa7 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update ChatListAdapter.kt

parent 64c8f2a1
......@@ -22,7 +22,7 @@ class ChatListAdapter(private var dataSet: MutableList<Chat>, private val contex
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val chat = dataSet[position]
holder.userAvatar.setImageURI(chat.userAvatarUri)
holder.userAvatar.setImageURI(chat.user.avatarUri)
holder.chatName.text = chat.name
holder.lastMessage.text = chat.lastMessage
holder.lastMessageDateTime.text = DateTimeHelper.getDate(chat.lastMessageDateTime, context)
......@@ -31,7 +31,7 @@ class ChatListAdapter(private var dataSet: MutableList<Chat>, private val contex
"p" -> DrawableHelper.compoundDrawable(holder.chatName, DrawableHelper.getDrawableFromId(R.drawable.ic_lock_outline_black, context))
"c" -> DrawableHelper.compoundDrawable(holder.chatName, DrawableHelper.getDrawableFromId(R.drawable.ic_hashtag_black, context))
"d" -> {
val userStatus = chat.userStatus
val userStatus = chat.user.status
if (userStatus != null) {
DrawableHelper.compoundDrawable(holder.chatName, DrawableHelper.getUserStatusDrawable(userStatus, context))
}
......
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