edit ReadView.kt

pull/862/head
gedoor 4 years ago
parent b3965be8e7
commit 7482cf8a96
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt

@ -242,7 +242,9 @@ class ReadView(context: Context, attrs: AttributeSet) :
/** /**
* 长按选择 * 长按选择
*/ */
private fun onLongPress() = with(curPage.textPage) { private fun onLongPress() {
kotlin.runCatching {
with(curPage.textPage) {
curPage.selectText(startX, startY) { relativePage, lineIndex, charIndex -> curPage.selectText(startX, startY) { relativePage, lineIndex, charIndex ->
isTextSelected = true isTextSelected = true
firstRelativePage = relativePage firstRelativePage = relativePage
@ -342,6 +344,8 @@ class ReadView(context: Context, attrs: AttributeSet) :
curPage.selectEndMoveIndex(firstRelativePage, lineEnd, end) curPage.selectEndMoveIndex(firstRelativePage, lineEnd, end)
} }
} }
}
}
/** /**
* 单击 * 单击

Loading…
Cancel
Save