diff --git a/app/src/main/java/io/legado/app/ui/widget/text/MultilineTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/MultilineTextView.kt index c0ccd86da..839ca59bd 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/MultilineTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/MultilineTextView.kt @@ -8,13 +8,8 @@ import androidx.appcompat.widget.AppCompatTextView class MultilineTextView(context: Context?, attrs: AttributeSet?) : AppCompatTextView(context, attrs) { - private var calculatedLines = false - override fun onDraw(canvas: Canvas?) { - if (!calculatedLines) { - calculateLines(); - calculatedLines = true; - } + calculateLines() super.onDraw(canvas) }