pull/37/head
kunfei 5 years ago
parent 7fbc96be34
commit 7f6eadd8dc
  1. 8
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt

@ -1,6 +1,7 @@
package io.legado.app.ui.rss.read package io.legado.app.ui.rss.read
import android.os.Bundle import android.os.Bundle
import android.webkit.WebViewClient
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
@ -14,11 +15,16 @@ class ReadRssActivity : VMBaseActivity<ReadRssViewModel>(R.layout.activity_rss_r
get() = getViewModel(ReadRssViewModel::class.java) get() = getViewModel(ReadRssViewModel::class.java)
override fun onActivityCreated(savedInstanceState: Bundle?) { override fun onActivityCreated(savedInstanceState: Bundle?) {
initLiveData()
title = intent.getStringExtra("title") title = intent.getStringExtra("title")
initWebView()
initLiveData()
viewModel.initData(intent) viewModel.initData(intent)
} }
private fun initWebView() {
webView.webViewClient = WebViewClient()
}
private fun initLiveData() { private fun initLiveData() {
viewModel.contentLiveData.observe(this, Observer { content -> viewModel.contentLiveData.observe(this, Observer { content ->
viewModel.rssArticle?.let { viewModel.rssArticle?.let {

Loading…
Cancel
Save