package com.yidianling.medical.im.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yidianling.avchatkit.common.util.TimeUtil
import com.yidianling.im.R
import com.yidianling.medical.im.bean.SystemItemBean

/**
 * 医生系统消息item adapter
 */
class MedicalSystemListAdapter :
    BaseQuickAdapter<SystemItemBean, BaseViewHolder>(R.layout.medical_item_system_list) {

    override fun convert(helper: BaseViewHolder, item: SystemItemBean) {
        //时间
        helper.setText(R.id.time_text, item.createTime)
        //标题
        item.title?.let { title ->
            helper.setText(R.id.system_title, title)
        }
        //内容
        item.content?.let { content ->
            helper.setText(R.id.system_dec, content)
        }
        helper.setVisible(R.id.chat_message_unread_num,!item.read)
    }
}