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