This commit is contained in:
Horis 2024-02-18 23:48:59 +08:00
parent f93084f3f1
commit a7d1f2157a
2 changed files with 3 additions and 3 deletions

View File

@ -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()
}

View File

@ -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))
}
}