From a5548e8ee6889b1d04bda6ec32963945006ca994 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 22 May 2022 20:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtxt=E7=AB=A0=E8=8A=82?= =?UTF-8?q?=E7=BB=93=E5=B0=BE=E6=96=AD=E7=A0=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/model/localBook/TextFile.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/localBook/TextFile.kt b/app/src/main/java/io/legado/app/model/localBook/TextFile.kt index 1f52bdd4e..2d726d843 100644 --- a/app/src/main/java/io/legado/app/model/localBook/TextFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/TextFile.kt @@ -173,13 +173,13 @@ class TextFile(private val book: Book) { val qyChapter = BookChapter() qyChapter.title = "前言" qyChapter.start = curOffset - qyChapter.end = chapterLength.toLong() + qyChapter.end = curOffset + chapterLength.toLong() toc.add(qyChapter) } //创建当前章节 val curChapter = BookChapter() curChapter.title = matcher.group() - curChapter.start = chapterLength.toLong() + curChapter.start = curOffset + chapterLength.toLong() toc.add(curChapter) } else { //否则就block分割之后,上一个章节的剩余内容 //获取上一章节