package com.zj365.mime.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.luck.picture.lib.entity.LocalMedia
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.zj365.mime.R

class PictureFeedAdapter: BaseAdapter<LocalMedia>(R.layout.item_picture_feed) {
    override fun convert(holder: BaseViewHolder, item: LocalMedia) {
        holder.setGone(R.id.imageDefault,item.size!=0L)
        if(item.size!=0L){
            holder.getView<ImageView>(R.id.mImage).setImage(context,item.compressPath)
        }
    }
}