From 9750eaeabc9777add3851d9fdd9c529e87450492 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 17 Aug 2019 22:57:26 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/model/webbook/BookContent.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/legado/app/model/webbook/BookContent.kt b/app/src/main/java/io/legado/app/model/webbook/BookContent.kt index bfa7f76a3..69f1f9425 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookContent.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookContent.kt @@ -80,9 +80,15 @@ object BookContent { content.append(item.content) } } + if (content.isNotEmpty()) { + if (!content[0].toString().startsWith(bookChapter.title)) { + content.insert(0, bookChapter.title) + } + } return content.toString() } + @Throws(Exception::class) private fun analyzeContent( body: String, contentRule: ContentRule,