Horis 2 年之前
父節點
當前提交
cf96150775

+ 1 - 1
app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt

@@ -85,7 +85,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
 
     override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
         super.onSizeChanged(w, h, oldw, oldh)
-        ChapterProvider.upViewSize(w, h, isMainView)
+        ChapterProvider.upViewSize(w, h)
         textPage.format()
     }
 

+ 2 - 2
app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@@ -850,12 +850,12 @@ object ChapterProvider {
     /**
      * 更新View尺寸
      */
-    fun upViewSize(width: Int, height: Int, postEvent: Boolean) {
+    fun upViewSize(width: Int, height: Int) {
         if (width > 0 && height > 0 && (width != viewWidth || height != viewHeight)) {
             viewWidth = width
             viewHeight = height
             upLayout()
-            if (postEvent) postEvent(EventBus.UP_CONFIG, arrayOf(2))
+            postEvent(EventBus.UP_CONFIG, arrayOf(5))
         }
     }