feat: 优化代码

pull/192/head
kunfei 5 years ago
parent 5995350bb9
commit 8febd169cc
  1. 1
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -252,6 +252,7 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(R.layout.activity_rss_r
web_view.settings.javaScriptEnabled = true web_view.settings.javaScriptEnabled = true
web_view.evaluateJavascript("document.documentElement.outerHTML") { web_view.evaluateJavascript("document.documentElement.outerHTML") {
val html = StringEscapeUtils.unescapeJson(it) val html = StringEscapeUtils.unescapeJson(it)
.replace("^\"|\"$".toRegex(), "")
Jsoup.parse(html).text() Jsoup.parse(html).text()
viewModel.readAloud(Jsoup.parse(html).textArray()) viewModel.readAloud(Jsoup.parse(html).textArray())
} }

Loading…
Cancel
Save