feat: 优化代码

pull/117/head
kunfei 5 years ago
parent edb0335919
commit 4546a2ad97
  1. 9
      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() { fun cancelSelect() {
textPage.textLines.forEach { textLine -> val last = if (ReadBookConfig.isScroll) 2 else 0
textLine.textChars.forEach { for (relativePos in 0..last) {
it.selected = false relativePage(relativePos).textLines.forEach { textLine ->
textLine.textChars.forEach {
it.selected = false
}
} }
} }
invalidate() invalidate()

Loading…
Cancel
Save