pull/517/head
gedoor 4 years ago
parent a28d2806cb
commit f5507a5023
  1. 4
      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 android.text.TextPaint
import io.legado.app.App import io.legado.app.App
import io.legado.app.constant.AppPattern 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.Book
import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookChapter
import io.legado.app.help.AppConfig import io.legado.app.help.AppConfig
@ -423,10 +424,11 @@ object ChapterProvider {
* 更新View尺寸 * 更新View尺寸
*/ */
fun upViewSize(width: Int, height: Int) { fun upViewSize(width: Int, height: Int) {
if (width > 0 && height > 0) { if (width > 0 && height > 0 && (width != viewWidth || height != viewHeight)) {
viewWidth = width viewWidth = width
viewHeight = height viewHeight = height
upVisibleSize() upVisibleSize()
postEvent(EventBus.UP_CONFIG, true)
} }
} }

Loading…
Cancel
Save