pull/84/head
kunfei 5 years ago
parent 5feebce678
commit 88482d25d7
  1. 8
      app/src/main/java/io/legado/app/ui/changecover/CoverAdapter.kt

@ -5,7 +5,6 @@ import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.data.entities.SearchBook
import io.legado.app.help.ImageLoader
import kotlinx.android.synthetic.main.item_cover.view.*
import org.jetbrains.anko.sdk27.listeners.onClick
@ -14,12 +13,7 @@ class CoverAdapter(context: Context, val callBack: CallBack) :
override fun convert(holder: ItemViewHolder, item: SearchBook, payloads: MutableList<Any>) {
with(holder.itemView) {
item.coverUrl?.let {
ImageLoader.load(context, it)
.error(R.drawable.image_cover_default)
.centerCrop()
.into(iv_cover)
}
iv_cover.load(item.coverUrl, item.name)
tv_source.text = item.originName
onClick {
callBack.changeTo(item.coverUrl!!)

Loading…
Cancel
Save