package com.swago.room.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.swago.baseswago.model.live.RoomUserModel
import com.swago.room.R
import de.hdodenhof.circleimageview.CircleImageView

/**
 *@date 2021/10/23 09:56
 *description:
 */
class RoomUserAdapter : BaseQuickAdapter<RoomUserModel.ListBean,BaseViewHolder>(R.layout.item_room_user, arrayListOf()) {

    override fun convert(helper: BaseViewHolder, item: RoomUserModel.ListBean) {
        helper.apply {
            val ivAvatar = itemView.findViewById<CircleImageView>(R.id.ivAvatar)
            Glide.with(itemView.context).load(item.user_head_img_url)
                .placeholder(R.mipmap.default_avatar)
                .error(R.mipmap.default_avatar).into(ivAvatar)
        }
    }
}