From 00187c0d1784da79a10bab5896f793cd2d85259f Mon Sep 17 00:00:00 2001 From: Koitharu Date: Fri, 28 Jul 2023 12:22:17 +0300 Subject: [PATCH] Fix description scrolling --- .../kotatsu/core/ui/widgets/SelectableTextView.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/SelectableTextView.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/SelectableTextView.kt index 32cb29875..7c14c6b8b 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/SelectableTextView.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/ui/widgets/SelectableTextView.kt @@ -26,4 +26,12 @@ class SelectableTextView @JvmOverloads constructor( Selection.setSelection(spannableText, text.length) } } + + override fun scrollTo(x: Int, y: Int) { + if (maxLines in 1 until Integer.MAX_VALUE) { + super.scrollTo(0, 0) + } else { + super.scrollTo(x, y) + } + } }