From d2a38993b89afbde261387ac849bad5110c15127 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 29 Jan 2022 08:30:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E6=96=87=E6=90=9C=E7=B4=A2=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E5=87=80=E5=8C=96=E8=B7=9F=E9=9A=8F=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/searchContent/SearchContentViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt b/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt index 0de6e302a..b23a2131f 100644 --- a/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt @@ -76,8 +76,8 @@ class SearchContentViewModel(application: Application) : BaseViewModel(applicati private fun searchPosition(pattern: String): List { val position: MutableList = mutableListOf() if (mContent.indexOf(pattern) >= 0) { - //搜索到内容才启用净化 - mContent = contentProcessor.replaceContent(mContent) + //搜索到内容允许净化 + if (book?.getUseReplaceRule() ?: false) mContent = contentProcessor!!.replaceContent(mContent) var index = mContent.indexOf(pattern) while (index >= 0) { position.add(index)