|
|
@ -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 { |
|
|
|