优化
This commit is contained in:
@@ -952,6 +952,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
success: (() -> Unit)?
|
||||
) {
|
||||
lifecycleScope.launch {
|
||||
binding.readView.cancelSelect()
|
||||
binding.readView.upContent(relativePosition, resetPageOffset)
|
||||
if (relativePosition == 0) {
|
||||
upSeekBarProgress()
|
||||
@@ -980,6 +981,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
override fun pageChanged() {
|
||||
pageChanged = true
|
||||
binding.readView.onPageChange()
|
||||
binding.readView.cancelSelect()
|
||||
handler.post {
|
||||
upSeekBarProgress()
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ data class TextPage(
|
||||
*/
|
||||
fun getPosByLineColumn(lineIndex: Int, columnIndex: Int): Int {
|
||||
var length = 0
|
||||
val maxIndex = min(lineIndex, lineSize)
|
||||
val maxIndex = min(lineIndex, lineSize - 1)
|
||||
for (index in 0 until maxIndex) {
|
||||
length += textLines[index].charSize
|
||||
if (textLines[index].isParagraphEnd) {
|
||||
|
||||
Reference in New Issue
Block a user