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:
parent
0319557683
commit
370a01daa1
2 changed files with 9 additions and 1 deletions
app/src/main/java/com/lagradost/cloudstream3/ui/download
|
@ -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,
|
||||
|
|
|
@ -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() {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue