mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-01 06:07:37 +00:00
Fix post loop when View is GONE.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user