pull/35/head^2
kunfei 5 years ago
parent f0dbf97c96
commit cc990cd613
  1. 5
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt
  2. 7
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -61,6 +61,9 @@ class RssArticlesActivity : VMBaseActivity<RssArticlesViewModel>(R.layout.activi
} }
override fun readRss(rssArticle: RssArticle) { override fun readRss(rssArticle: RssArticle) {
startActivity<ReadRssActivity>(Pair("description", rssArticle.description)) startActivity<ReadRssActivity>(
Pair("description", rssArticle.description),
Pair("url", rssArticle.link)
)
} }
} }

@ -9,7 +9,12 @@ class ReadRssActivity : BaseActivity(R.layout.activity_rss_read) {
override fun onActivityCreated(savedInstanceState: Bundle?) { override fun onActivityCreated(savedInstanceState: Bundle?) {
val description = intent.getStringExtra("description") val description = intent.getStringExtra("description")
webView.loadData("<style>img{max-width:100%}</style>$description","text/html", "utf-8") val url = intent.getStringExtra("url")
if (description.isNullOrBlank()) {
webView.loadUrl(url)
} else {
webView.loadData("<style>img{max-width:100%}</style>$description", "text/html", "utf-8")
}
} }
} }
Loading…
Cancel
Save