feat: 优化代码

pull/198/head
kunfei 5 years ago
parent e126348cac
commit 2f6ccce755
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt

@ -20,7 +20,7 @@ data class TextPage(
fun upLinesPosition() = ChapterProvider.apply {
if (textLines.size <= 1) return@apply
if (visibleHeight - height > with(textLines.last()) { lineBottom - lineTop }) return@apply
if (visibleHeight - height >= with(textLines.last()) { lineBottom - lineTop }) return@apply
val surplus = (visibleBottom - textLines.last().lineBottom)
if (surplus == 0f) return@apply
height += surplus

Loading…
Cancel
Save