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
|
@ -174,6 +174,10 @@ class DownloadAdapter(
|
||||||
// We need to make sure we restore the correct progress
|
// We need to make sure we restore the correct progress
|
||||||
// when we refresh data in the adapter.
|
// when we refresh data in the adapter.
|
||||||
downloadButton.resetView()
|
downloadButton.resetView()
|
||||||
|
val drawable = downloadButton.getDrawableFromStatus(status)?.let {
|
||||||
|
ContextCompat.getDrawable(downloadButton.context, it)
|
||||||
|
}
|
||||||
|
downloadButton.statusView.setImageDrawable(drawable)
|
||||||
downloadButton.progressBar.progressDrawable =
|
downloadButton.progressBar.progressDrawable =
|
||||||
ContextCompat.getDrawable(
|
ContextCompat.getDrawable(
|
||||||
downloadButton.context,
|
downloadButton.context,
|
||||||
|
@ -264,6 +268,10 @@ class DownloadAdapter(
|
||||||
// We need to make sure we restore the correct progress
|
// We need to make sure we restore the correct progress
|
||||||
// when we refresh data in the adapter.
|
// when we refresh data in the adapter.
|
||||||
downloadButton.resetView()
|
downloadButton.resetView()
|
||||||
|
val drawable = downloadButton.getDrawableFromStatus(status)?.let {
|
||||||
|
ContextCompat.getDrawable(downloadButton.context, it)
|
||||||
|
}
|
||||||
|
downloadButton.statusView.setImageDrawable(drawable)
|
||||||
downloadButton.progressBar.progressDrawable =
|
downloadButton.progressBar.progressDrawable =
|
||||||
ContextCompat.getDrawable(
|
ContextCompat.getDrawable(
|
||||||
downloadButton.context,
|
downloadButton.context,
|
||||||
|
|
|
@ -58,7 +58,7 @@ open class PieFetchButton(context: Context, attributeSet: AttributeSet) :
|
||||||
}
|
}
|
||||||
|
|
||||||
private var progressBarBackground: View
|
private var progressBarBackground: View
|
||||||
private var statusView: ImageView
|
var statusView: ImageView
|
||||||
|
|
||||||
open fun onInflate() {}
|
open fun onInflate() {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue