Horis 3 lat temu
rodzic
commit
ac11d54e0e

+ 1 - 1
app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@@ -475,7 +475,7 @@ object ChapterProvider {
             }
             textLine.paragraphNum = paragraphNum
             textLine.chapterPosition =
-                (textPages.getOrNull(textPages.lastIndex - 1)?.lines?.last()?.run {
+                (textPages.getOrNull(textPages.lastIndex - 1)?.lines?.lastOrNull()?.run {
                     chapterPosition + charSize + if (isParagraphEnd) 1 else 0
                 } ?: 0) + sbLength
             textLine.pagePosition = sbLength