mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
f93084f3f1
commit
a7d1f2157a
@ -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()
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user