diff --git a/app/src/main/java/io/legado/app/constant/PreferKey.kt b/app/src/main/java/io/legado/app/constant/PreferKey.kt
index 729225d5f..4b949fe4e 100644
--- a/app/src/main/java/io/legado/app/constant/PreferKey.kt
+++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt
@@ -50,6 +50,7 @@ object PreferKey {
const val barElevation = "barElevation"
const val transparentStatusBar = "transparentStatusBar"
const val defaultCover = "defaultCover"
+ const val replaceEnableDefault = "replaceEnableDefault"
const val cPrimary = "colorPrimary"
const val cAccent = "colorAccent"
diff --git a/app/src/main/java/io/legado/app/data/entities/Book.kt b/app/src/main/java/io/legado/app/data/entities/Book.kt
index 4ab350534..33d5d309b 100644
--- a/app/src/main/java/io/legado/app/data/entities/Book.kt
+++ b/app/src/main/java/io/legado/app/data/entities/Book.kt
@@ -8,6 +8,7 @@ import androidx.room.PrimaryKey
import io.legado.app.App
import io.legado.app.constant.AppPattern
import io.legado.app.constant.BookType
+import io.legado.app.help.AppConfig
import io.legado.app.service.help.ReadBook
import io.legado.app.utils.GSON
import io.legado.app.utils.fromJsonObject
@@ -51,7 +52,7 @@ data class Book(
var canUpdate: Boolean = true, // 刷新书架时更新书籍信息
var order: Int = 0, // 手动排序
var originOrder: Int = 0, //书源排序
- var useReplaceRule: Boolean = true, // 正文使用净化替换规则
+ var useReplaceRule: Boolean = AppConfig.replaceEnableDefault, // 正文使用净化替换规则
var variable: String? = null // 自定义书籍变量信息(用于书源规则检索书籍信息)
) : Parcelable, BaseBook {
diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt
index 0c4851f61..8157af173 100644
--- a/app/src/main/java/io/legado/app/help/AppConfig.kt
+++ b/app/src/main/java/io/legado/app/help/AppConfig.kt
@@ -132,6 +132,9 @@ object AppConfig {
App.INSTANCE.putPrefInt(PreferKey.barElevation, value)
}
+ var replaceEnableDefault: Boolean =
+ App.INSTANCE.getPrefBoolean(PreferKey.replaceEnableDefault, true)
+
val autoChangeSource: Boolean get() = App.INSTANCE.getPrefBoolean("autoChangeSource", true)
val readBodyToLh: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.readBodyToLh, true)
diff --git a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
index 34e629e33..57611e8ad 100644
--- a/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
+++ b/app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
@@ -22,6 +22,7 @@ import io.legado.app.help.AppConfig
import io.legado.app.help.permission.Permissions
import io.legado.app.help.permission.PermissionsCompat
import io.legado.app.lib.dialogs.alert
+import io.legado.app.lib.theme.bottomBackground
import io.legado.app.ui.filechooser.FileChooserDialog
import io.legado.app.ui.filechooser.FilePicker
import io.legado.app.utils.*
@@ -58,6 +59,7 @@ class FontSelectDialog : BaseDialogFragment(),
}
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
+ tool_bar.setBackgroundColor(requireContext().bottomBackground)
tool_bar.setTitle(R.string.select_font)
tool_bar.inflateMenu(R.menu.font_select)
tool_bar.setOnMenuItemClickListener(this)
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index c99435181..0f81aabf4 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -729,4 +729,6 @@
分組名稱
備註內容
E-Ink模式下只有白纸黑字,不显示其它背景
+ 默认启用替换净化
+ 新加入书架的书是否启用替换净化
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index cb1451086..214049b79 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -729,5 +729,7 @@
分組名稱
備註內容
E-Ink模式下只有白纸黑字,不显示其它背景
+ 默认启用替换净化
+ 新加入书架的书是否启用替换净化
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index 7f3b79003..197cd7633 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -729,4 +729,6 @@
分组名称
备注内容
E-Ink模式下只有白纸黑字,不显示其它背景
+ 默认启用替换净化
+ 新加入书架的书是否启用替换净化
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 53c6d8adf..444710bf5 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -730,5 +730,7 @@
Group name
Remarks section
E-Ink模式下只有白纸黑字,不显示其它背景
+ 默认启用替换净化
+ 新加入书架的书是否启用替换净化
\ No newline at end of file
diff --git a/app/src/main/res/xml/pref_config_other.xml b/app/src/main/res/xml/pref_config_other.xml
index e906b984b..3d3752da1 100644
--- a/app/src/main/res/xml/pref_config_other.xml
+++ b/app/src/main/res/xml/pref_config_other.xml
@@ -45,6 +45,13 @@
app:allowDividerBelow="false"
app:iconSpaceReserved="false">
+
+