From 847abe37f4d4ba78c898d78ae94dc7d3ab66b2b4 Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Fri, 21 Feb 2025 11:35:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../read/page/provider/TextChapterLayout.kt | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt index 856b9fb3e..31eaf4f4e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/TextChapterLayout.kt @@ -242,7 +242,7 @@ class TextChapterLayout( contentPaint, contentPaintTextHeight, contentPaintFontMetrics, - book.getImageStyle(), + imageStyle, srcList = srcList ) } else { @@ -250,30 +250,32 @@ class TextChapterLayout( isSetTypedImage = false prepareNextPageIfNeed() } - val matcher = AppPattern.imgPattern.matcher(content) var start = 0 - while (matcher.find()) { - coroutineContext.ensureActive() - val text = content.substring(start, matcher.start()) - if (text.isNotBlank()) { - setTypeText( + if (content.contains("