From c47c00054b737aa760b8d934d9d47d5a6f544d51 Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:04:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/book/read/page/provider/TextChapterLayout.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 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 e3d505147..a45aed841 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 @@ -446,7 +446,10 @@ class TextChapterLayout( val textLine = TextLine(isTitle = isTitle) if (durY + textHeight > visibleHeight) { val textPage = pendingTextPage - textPage.height = textPage.lines.lastOrNull()?.lineBottom ?: 0f + val height = textPage.lines.lastOrNull()?.lineBottom ?: 0f + if (textPage.height < height) { + textPage.height = height + } if (doublePage && absStartX < viewWidth / 2) { //当前页面左列结束 textPage.leftLineSize = textPage.lineSize @@ -528,8 +531,9 @@ class TextChapterLayout( val textPage = pendingTextPage textPage.addLine(textLine) durY += textHeight * lineSpacingExtra - if (textPage.height < durY) { - textPage.height = durY + val height = textPage.lines.lastOrNull()?.lineBottom ?: 0f + if (textPage.height < height) { + textPage.height = height } } durY += textHeight * paragraphSpacing / 10f From 7afe82679008b3ad90f32a32a8de24669716fbd3 Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Sat, 17 Aug 2024 12:20:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/storage/Backup.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/io/legado/app/help/storage/Backup.kt b/app/src/main/java/io/legado/app/help/storage/Backup.kt index 87924fcd2..0fc6e0a11 100644 --- a/app/src/main/java/io/legado/app/help/storage/Backup.kt +++ b/app/src/main/java/io/legado/app/help/storage/Backup.kt @@ -216,10 +216,14 @@ object Backup { coroutineContext.ensureActive() withContext(IO) { if (list.isNotEmpty()) { + AppLog.put("阅读备份 $fileName 列表大小 ${list.size}") val file = FileUtils.createFileIfNotExist(path + File.separator + fileName) file.outputStream().buffered().use { GSON.writeToOutputStream(it, list) } + AppLog.put("阅读备份 $fileName 写入大小 ${file.length()}") + } else { + AppLog.put("阅读备份 $fileName 列表为空") } } }