mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Fix paused download UI bug when adapter is refreshed
This commit is contained in:
parent
ca59982d60
commit
04d6b2a6b9
1 changed files with 6 additions and 2 deletions
|
@ -171,7 +171,9 @@ class DownloadAdapter(
|
||||||
?.let { ContextCompat.getDrawable(downloadButton.context, it) }
|
?.let { ContextCompat.getDrawable(downloadButton.context, it) }
|
||||||
downloadHeaderInfo.text = formattedSize
|
downloadHeaderInfo.text = formattedSize
|
||||||
} else {
|
} else {
|
||||||
downloadButton.doSetProgress = true
|
// We need to make sure we restore the correct progress
|
||||||
|
// when we refresh data in the adapter.
|
||||||
|
downloadButton.resetView()
|
||||||
downloadButton.progressBar.progressDrawable =
|
downloadButton.progressBar.progressDrawable =
|
||||||
ContextCompat.getDrawable(
|
ContextCompat.getDrawable(
|
||||||
downloadButton.context,
|
downloadButton.context,
|
||||||
|
@ -259,7 +261,9 @@ class DownloadAdapter(
|
||||||
downloadChildEpisodeTextExtra.text =
|
downloadChildEpisodeTextExtra.text =
|
||||||
formatShortFileSize(downloadChildEpisodeTextExtra.context, card.totalBytes)
|
formatShortFileSize(downloadChildEpisodeTextExtra.context, card.totalBytes)
|
||||||
} else {
|
} else {
|
||||||
downloadButton.doSetProgress = true
|
// We need to make sure we restore the correct progress
|
||||||
|
// when we refresh data in the adapter.
|
||||||
|
downloadButton.resetView()
|
||||||
downloadButton.progressBar.progressDrawable =
|
downloadButton.progressBar.progressDrawable =
|
||||||
ContextCompat.getDrawable(
|
ContextCompat.getDrawable(
|
||||||
downloadButton.context,
|
downloadButton.context,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue