Commit 5dabfbae authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Don't need to whether the user status = null

parent 89363d0f
......@@ -30,12 +30,7 @@ class ChatListAdapter(private var dataSet: MutableList<Chat>, private val contex
when (chat.type) {
"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.user.status
if (userStatus != null) {
DrawableHelper.compoundDrawable(holder.chatName, DrawableHelper.getUserStatusDrawable(userStatus, context))
}
}
"d" -> DrawableHelper.compoundDrawable(holder.chatName, DrawableHelper.getUserStatusDrawable(chat.user.status, context))
}
val totalUnreadMessage = chat.totalUnreadMessages
......
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