From 223564a8666ec8baddb8dc900af4be1ba2b13c13 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Oct 2019 20:23:17 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/rss/article/RssArticlesActivity.kt | 1 + .../java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt index 40e943756..70137fa22 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt @@ -65,5 +65,6 @@ class RssArticlesActivity : VMBaseActivity(R.layout.activi Pair("description", rssArticle.description), Pair("url", rssArticle.link) ) + viewModel.read(rssArticle) } } \ No newline at end of file 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 55e45bfc8..a89af62ba 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 @@ -10,6 +10,7 @@ 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 +import org.jetbrains.anko.textColorResource class RssArticlesAdapter(context: Context, val callBack: CallBack) : @@ -29,6 +30,11 @@ class RssArticlesAdapter(context: Context, val callBack: CallBack) : ImageLoader.load(context, item.image) .setAsBitmap(image_view) } + if (item.read) { + tv_title.textColorResource = R.color.tv_text_secondary + } else { + tv_title.textColorResource = R.color.tv_text_default + } } }