From b5565a96c5926a70cdf3c7dc97a86ced12346117 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 2 Oct 2019 23:04:37 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/rss/article/RssArticlesAdapter.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt index f75ad0f21..55e45bfc8 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt @@ -5,6 +5,9 @@ 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.RssArticle +import io.legado.app.help.ImageLoader +import io.legado.app.utils.gone +import io.legado.app.utils.visible import kotlinx.android.synthetic.main.item_rss_article.view.* import org.jetbrains.anko.sdk27.listeners.onClick @@ -19,6 +22,13 @@ class RssArticlesAdapter(context: Context, val callBack: CallBack) : onClick { callBack.readRss(item) } + if (item.image.isNullOrBlank()) { + image_view.gone() + } else { + image_view.visible() + ImageLoader.load(context, item.image) + .setAsBitmap(image_view) + } } }