package com.duben.happyplaylet.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.library.utils.GlideUtils
import com.duben.happyplaylet.R
import com.duben.happyplaylet.mvp.model.VedioBean

class NewHotStyleAdapter : BaseQuickAdapter<VedioBean, BaseViewHolder>(R.layout.item_hot_style) {
    override fun convert(holder: BaseViewHolder, item: VedioBean) {
        item?.let {
            holder.setText(
                R.id.tvVedioItemCount,
                "${if (it.completeStatus == 0) "已完结" else "更新至${it.vedioTotal}集"}"
            )
            holder.setText(
                R.id.tvVedioItemTitle,
                "${it.title}"
            )
            holder.setText(
                R.id.tvVedioItemText,
                "${it.vedioDesc}"
            )
            GlideUtils.loadImageViewGifForCenterCrop(
                context,
                it.coverImage,
                holder.getView(R.id.ivVedioItem)
            )
        }

    }

}