From 3d81ab4e26d99b78d467197eafabe21efd574dc8 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 9 Dec 2020 18:02:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=96=87=E6=9C=AC=E6=97=B6?= =?UTF-8?q?=E4=BC=98=E5=85=88=E9=80=89=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/read/page/PageView.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt index 402666168..041ce7025 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt @@ -259,7 +259,11 @@ class PageView(context: Context) : FrameLayout(context) { } fun selectStartMoveIndex(relativePage: Int, lineIndex: Int, charIndex: Int) { - binding.contentTextView.selectStartMoveIndex(relativePage, lineIndex, charIndex) + try { + binding.contentTextView.selectStartMoveIndex(relativePage, lineIndex, charIndex) + } catch (e: Exception) { + print("selectStartMoveIndex($relativePage, $lineIndex, $charIndex)") + } } fun selectEndMove(x: Float, y: Float) { @@ -267,7 +271,11 @@ class PageView(context: Context) : FrameLayout(context) { } fun selectEndMoveIndex(relativePage: Int, lineIndex: Int, charIndex: Int) { - binding.contentTextView.selectEndMoveIndex(relativePage, lineIndex, charIndex) + try { + binding.contentTextView.selectEndMoveIndex(relativePage, lineIndex, charIndex) + } catch (e: Exception) { + print("selectEndMoveIndex($relativePage, $lineIndex, $charIndex)") + } } fun cancelSelect() {