pull/37/head
kunfei 5 years ago
parent d312b5be51
commit ad7774a9c0
  1. 2
      app/src/main/java/io/legado/app/data/entities/RssArticle.kt
  2. 6
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt

@ -10,7 +10,7 @@ import androidx.room.Ignore
)
data class RssArticle(
var origin: String = "",
var title: String? = "",
var title: String = "",
var order: Long = 0,
var author: String? = null,
var link: String? = null,

@ -16,8 +16,10 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application) {
fun initData(intent: Intent) {
execute {
intent.getStringExtra("guid")?.let {
val rssArticle = App.db.rssArtivleDao().get(it)
val origin = intent.getStringExtra("origin")
val title = intent.getStringExtra("title")
if (origin != null && title != null) {
val rssArticle = App.db.rssArtivleDao().get(origin, title)
if (rssArticle != null) {
if (!rssArticle.description.isNullOrBlank()) {
contentLiveData.postValue(rssArticle.description)

Loading…
Cancel
Save