pull/2189/head
kunfei 2 years ago
parent 5fe9ae68a3
commit 391318b317
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt

@ -566,12 +566,14 @@ class ReadView(context: Context, attrs: AttributeSet) :
*/ */
fun aloudStartSelect() { fun aloudStartSelect() {
val selectStartPos = curPage.selectStartPos val selectStartPos = curPage.selectStartPos
var pagePos = selectStartPos.relativePagePos
val line = selectStartPos.lineIndex val line = selectStartPos.lineIndex
val column = selectStartPos.charIndex val column = selectStartPos.charIndex
if (selectStartPos.relativePagePos > 0) { while (pagePos > 0) {
if (!ReadBook.moveToNextPage()) { if (!ReadBook.moveToNextPage()) {
ReadBook.moveToNextChapter(false) ReadBook.moveToNextChapter(false)
} }
pagePos--
} }
val startPos = curPage.textPage.getPosByLineColumn(line, column) val startPos = curPage.textPage.getPosByLineColumn(line, column)
ReadAloud.play(context, startPos = startPos) ReadAloud.play(context, startPos = startPos)

Loading…
Cancel
Save