mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
全文搜索替换净化跟随 用户设置
This commit is contained in:
parent
b181d81f17
commit
d2a38993b8
@ -76,8 +76,8 @@ class SearchContentViewModel(application: Application) : BaseViewModel(applicati
|
|||||||
private fun searchPosition(pattern: String): List<Int> {
|
private fun searchPosition(pattern: String): List<Int> {
|
||||||
val position: MutableList<Int> = mutableListOf()
|
val position: MutableList<Int> = mutableListOf()
|
||||||
if (mContent.indexOf(pattern) >= 0) {
|
if (mContent.indexOf(pattern) >= 0) {
|
||||||
//搜索到内容才启用净化
|
//搜索到内容允许净化
|
||||||
mContent = contentProcessor.replaceContent(mContent)
|
if (book?.getUseReplaceRule() ?: false) mContent = contentProcessor!!.replaceContent(mContent)
|
||||||
var index = mContent.indexOf(pattern)
|
var index = mContent.indexOf(pattern)
|
||||||
while (index >= 0) {
|
while (index >= 0) {
|
||||||
position.add(index)
|
position.add(index)
|
||||||
|
Loading…
Reference in New Issue
Block a user