From cc990cd6138c6cf37589f2a86632d094d8f124f4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Oct 2019 18:39:17 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/rss/article/RssArticlesActivity.kt | 5 ++++- .../main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 7962e6bfd..40e943756 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 @@ -61,6 +61,9 @@ class RssArticlesActivity : VMBaseActivity(R.layout.activi } override fun readRss(rssArticle: RssArticle) { - startActivity(Pair("description", rssArticle.description)) + startActivity( + Pair("description", rssArticle.description), + Pair("url", rssArticle.link) + ) } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index f13f41b61..eb8fa6451 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -9,7 +9,12 @@ class ReadRssActivity : BaseActivity(R.layout.activity_rss_read) { override fun onActivityCreated(savedInstanceState: Bundle?) { val description = intent.getStringExtra("description") - webView.loadData("$description","text/html", "utf-8") + val url = intent.getStringExtra("url") + if (description.isNullOrBlank()) { + webView.loadUrl(url) + } else { + webView.loadData("$description", "text/html", "utf-8") + } } } \ No newline at end of file