Fix post loop when View is GONE.
This commit is contained in:
parent
c93457402c
commit
738c5db7c2
1 changed files with 13 additions and 0 deletions
|
@ -11,6 +11,7 @@ import android.view.animation.AnimationUtils
|
|||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isGone
|
||||
import androidx.interpolator.view.animation.FastOutSlowInInterpolator
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.util.ViewUtil
|
||||
|
@ -54,7 +55,19 @@ class SignalBottomActionBar(context: Context, attributeSet: AttributeSet) : Line
|
|||
present(this.items)
|
||||
}
|
||||
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
|
||||
if (w != oldw) {
|
||||
present(items)
|
||||
}
|
||||
}
|
||||
|
||||
private fun present(items: List<ActionItem>) {
|
||||
if (isGone) {
|
||||
return
|
||||
}
|
||||
|
||||
if (width == 0) {
|
||||
post { present(items) }
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue