package com.common.im.adapter;

import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.common.im.bean.ContactListBean;
import com.common.im_ui.R;
import com.cooleshow.base.presenter.view.BaseView;
import com.cooleshow.base.utils.GlideUtils;

import androidx.annotation.NonNull;

/**
 * Author by pq, Date on 2022/5/7.
 */
public class ContactListAdapter extends BaseQuickAdapter<ContactListBean, BaseViewHolder> {
    public ContactListAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, ContactListBean contactListBean) {
        holder.setText(R.id.tv_name, contactListBean.friendNickname);
        ImageView iv_icon = holder.getView(R.id.iv_icon);
        GlideUtils.INSTANCE.loadImage(getContext(), contactListBean.friendAvatar, iv_icon);
    }
}
