From 4546a2ad97aa0c65faa5eddc17f8a2c8c1acd0bc Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 25 Feb 2020 14:26:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/page/ContentTextView.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 9c23ff89a..6b4c329e1 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 @@ -456,9 +456,12 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at } fun cancelSelect() { - textPage.textLines.forEach { textLine -> - textLine.textChars.forEach { - it.selected = false + val last = if (ReadBookConfig.isScroll) 2 else 0 + for (relativePos in 0..last) { + relativePage(relativePos).textLines.forEach { textLine -> + textLine.textChars.forEach { + it.selected = false + } } } invalidate()