From 3cf9fb63449095b4c49c36783c16ee4c26bda827 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 9 Mar 2020 12:39:17 +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 --- .../java/io/legado/app/ui/book/read/page/entities/TextPage.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt index adb5f0ec9..6c4e27073 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt @@ -22,9 +22,9 @@ data class TextPage( if (textLines.size <= 1) return if (visibleHeight - height > with(textLines.last()) { lineBottom - lineTop }) return val surplus = (visibleHeight - textLines.last().lineBottom) + if (surplus == 0f) return height += surplus val tj = surplus / (textLines.size - 1) - if (tj == 0f) return for (i in 1 until textLines.size) { val line = textLines[i] line.lineTop = line.lineTop + tj * i