This commit is contained in:
Horis
2023-10-01 20:47:36 +08:00
parent 298a824d0c
commit 1127100c68
@@ -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