Commit 5025ece8 authored by leichao.gao's avatar leichao.gao

简化代码

parent 9d9eaab8
......@@ -46,12 +46,9 @@ class RecycleBinAdapter(val click: (bean: RecycleBinBean) -> Unit) : RecyclerVie
override fun onBindViewHolder(holder: RBAV, position: Int) {
val binding = ItemRecyclebinFileBinding.bind(holder.itemView)
val bean = beanList[position]
val file = File(bean.backupPath)
val context = holder.itemView.context
LogEx.logDebug("glc","bean.backupPath "+bean.backupPath)
LogEx.logDebug("glc","bean.absoluteFile "+bean.backupPath)
Glide.with(context).load(file?.absoluteFile).listener(object : RequestListener<Drawable> {
Glide.with(context).load(bean.backupPath).listener(object : RequestListener<Drawable> {
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>, isFirstResource: Boolean): Boolean {
LogEx.logDebug(TAG, "Failed to load image: $model")
return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment