Avoid uneeded check

This commit is contained in:
Luna712 2024-07-04 15:04:50 -06:00 committed by GitHub
parent 27d0bba95c
commit 9f5cc24747
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,15 +128,13 @@ open class PieFetchButton(context: Context, attributeSet: AttributeSet) :
R.styleable.PieFetchButton_download_icon_removed, R.drawable.netflix_download R.styleable.PieFetchButton_download_icon_removed, R.drawable.netflix_download
) )
if (doSetProgress) { val fillIndex = getInt(R.styleable.PieFetchButton_download_fill, 0)
val fillIndex = getInt(R.styleable.PieFetchButton_download_fill, 0)
progressDrawable = getResourceId( progressDrawable = getResourceId(
R.styleable.PieFetchButton_download_fill_override, fillArray[fillIndex] R.styleable.PieFetchButton_download_fill_override, fillArray[fillIndex]
) )
progressBar.progressDrawable = ContextCompat.getDrawable(context, progressDrawable) progressBar.progressDrawable = ContextCompat.getDrawable(context, progressDrawable)
}
recycle() recycle()
} }