3
3
Fork 1
mirror of https://github.com/recloudstream/cloudstream.git synced 2024-08-15 01:53:11 +00:00

Partial fix for UI updates

This does not fully fix the issue but does prevent a whole diffrent icon from showing first but the progress still has to re-populate
This commit is contained in:
Luna712 2024-07-19 15:13:24 -06:00 committed by GitHub
parent 0319557683
commit 370a01daa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions
app/src/main/java/com/lagradost/cloudstream3/ui/download

View file

@ -174,6 +174,10 @@ class DownloadAdapter(
// We need to make sure we restore the correct progress
// when we refresh data in the adapter.
downloadButton.resetView()
val drawable = downloadButton.getDrawableFromStatus(status)?.let {
ContextCompat.getDrawable(downloadButton.context, it)
}
downloadButton.statusView.setImageDrawable(drawable)
downloadButton.progressBar.progressDrawable =
ContextCompat.getDrawable(
downloadButton.context,
@ -264,6 +268,10 @@ class DownloadAdapter(
// We need to make sure we restore the correct progress
// when we refresh data in the adapter.
downloadButton.resetView()
val drawable = downloadButton.getDrawableFromStatus(status)?.let {
ContextCompat.getDrawable(downloadButton.context, it)
}
downloadButton.statusView.setImageDrawable(drawable)
downloadButton.progressBar.progressDrawable =
ContextCompat.getDrawable(
downloadButton.context,

View file

@ -58,7 +58,7 @@ open class PieFetchButton(context: Context, attributeSet: AttributeSet) :
}
private var progressBarBackground: View
private var statusView: ImageView
var statusView: ImageView
open fun onInflate() {}