diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index 1184e4143..e474bff96 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -257,9 +257,6 @@ object BookHelp { } } } - if (!content.substringBefore("\n").contains(title)) { - c = title + "\n" + c - } for (item in replaceRules) { item.pattern.let { if (it.isNotEmpty()) { @@ -271,6 +268,9 @@ object BookHelp { } } } + if (!content.substringBefore("\n").contains(title)) { + c = title + "\n" + c + } when (AppConfig.chineseConverterType) { 1 -> c = ZhConvertBootstrap.newInstance().toSimple(c) 2 -> c = ZhConvertBootstrap.newInstance().toTraditional(c) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt index a170ac02a..bf190deae 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt @@ -18,14 +18,17 @@ import io.legado.app.utils.getPrefBoolean class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, attrs) { - - var selectAble = context.getPrefBoolean(PreferKey.textSelectAble) private val selectedPaint by lazy { Paint().apply { color = context.getCompatColor(R.color.btn_bg_press_2) style = Paint.Style.FILL } } + var selectAble = context.getPrefBoolean(PreferKey.textSelectAble) + var selectStartLine = 0 + var selectStartChar = 0 + var selectEndLine = 0 + var selectEndChar = 0 private var textPage: TextPage? = null fun setContent(textPage: TextPage?) {