From f5507a50238d292eee2e21d201fe77d447f449aa Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 3 Dec 2020 22:25:08 +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 --- .../legado/app/ui/book/read/page/provider/ChapterProvider.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt index 0dd420e38..f81ddfffb 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt @@ -8,6 +8,7 @@ import android.text.StaticLayout import android.text.TextPaint import io.legado.app.App import io.legado.app.constant.AppPattern +import io.legado.app.constant.EventBus import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.help.AppConfig @@ -423,10 +424,11 @@ object ChapterProvider { * 更新View尺寸 */ fun upViewSize(width: Int, height: Int) { - if (width > 0 && height > 0) { + if (width > 0 && height > 0 && (width != viewWidth || height != viewHeight)) { viewWidth = width viewHeight = height upVisibleSize() + postEvent(EventBus.UP_CONFIG, true) } }