|
|
|
@ -59,20 +59,11 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(R.layout.activity_rss_r |
|
|
|
|
viewModel.rssArticle?.let { |
|
|
|
|
upJavaScriptEnable() |
|
|
|
|
val url = NetworkUtils.getAbsoluteURL(it.origin, it.link) |
|
|
|
|
val html = viewModel.clHtml(content) |
|
|
|
|
if (viewModel.rssSource?.loadWithBaseUrl == true) { |
|
|
|
|
webView.loadDataWithBaseURL( |
|
|
|
|
url, |
|
|
|
|
"<style>img{max-width:100%}</style>$content", |
|
|
|
|
"text/html", |
|
|
|
|
"utf-8", |
|
|
|
|
url |
|
|
|
|
) |
|
|
|
|
webView.loadDataWithBaseURL(url, html, "text/html", "utf-8", url) |
|
|
|
|
} else { |
|
|
|
|
webView.loadData( |
|
|
|
|
"<style>img{max-width:100%}</style>$content", |
|
|
|
|
"text/html", |
|
|
|
|
"utf-8" |
|
|
|
|
) |
|
|
|
|
webView.loadData(html, "text/html", "utf-8") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|