feat: 优化代码

pull/106/head
kunfei 5 years ago
parent 146f012afc
commit da5fa596e3
  1. 7
      app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt

@ -24,8 +24,13 @@ data class TextPage(
fun upPageAloudSpan(pageStart: Int) {
if (text is SpannableStringBuilder) {
removePageAloudSpan()
var lineStart = 0
for (textLine in textLines) {
if (pageStart > lineStart && pageStart < lineStart + textLine.text.length) {
textLine.isReadAloud = true
break
}
lineStart += textLine.text.length
}
}
}

Loading…
Cancel
Save