From 4fee2df791b03d80cd6f7a65874e27a689967458 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 20 Dec 2020 17:24:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/rss/read/ReadRssViewModel.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt index 8a32734c6..0c09f71e6 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt @@ -66,7 +66,16 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application), } } } else { - loadUrl(origin, origin) + val ruleContent = rssSource?.ruleContent + if (ruleContent.isNullOrBlank()) { + loadUrl(origin, origin) + } else { + val rssArticle = RssArticle() + rssArticle.origin = origin + rssArticle.link = origin + rssArticle.title = rssSource!!.sourceName + loadContent(rssArticle, ruleContent) + } } } }.onFinally {