mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -88,10 +88,6 @@ class ContentProcessor private constructor(
|
||||
return contentReplaceRules
|
||||
}
|
||||
|
||||
fun getAllReplaceRules(): List<ReplaceRule> {
|
||||
return titleReplaceRules + contentReplaceRules
|
||||
}
|
||||
|
||||
fun getContent(
|
||||
book: Book,
|
||||
chapter: BookChapter,
|
||||
|
||||
@@ -26,7 +26,7 @@ class ReplaceRuleViewModel(application: Application) : BaseViewModel(application
|
||||
if (showApplied) {
|
||||
val book = ReadBook.book ?: return@execute
|
||||
val textChapter = ReadBook.curTextChapter ?: return@execute
|
||||
enabledForBookRules = ContentProcessor.get(book).getAllReplaceRules().toSet()
|
||||
enabledForBookRules = ContentProcessor.get(book).getContentReplaceRules().toSet()
|
||||
textChapter.effectiveReplaceRules?.let {
|
||||
appliedForBookRules = it.toSet()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user