From a3918564e892e5138b4ebf28e85ee95de06ba3ba Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 3 May 2020 21:37:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/rss/read/ReadRssViewModel.kt | 33 ++++++++++++------- app/src/main/res/values-zh-rHK/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 24 insertions(+), 13 deletions(-) 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 f5b84642f..72af31aca 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 @@ -138,17 +138,28 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application), } fun clHtml(content: String): String { - return if (content.contains(" - $content - """.trimIndent() + return when { + !rssSource?.style.isNullOrEmpty() -> { + """ + + $content + """.trimIndent() + } + content.contains(" + $content + """.trimIndent() + } } } diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 79ff25a1c..7aa554fdb 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -417,7 +417,7 @@ 描述規則 (ruleDescription) 圖片 url 規則 (ruleImage) 內容規則 (ruleContent) - 樣式 + 樣式 (style) 鏈接規則 (ruleLink) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 448a53465..83e6bdc84 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -417,7 +417,7 @@ 描述规则(ruleDescription) 图片url规则(ruleImage) 内容规则(ruleContent) - 样式 + 样式(style) 链接规则(ruleLink)