3
3
Fork 1
mirror of https://github.com/recloudstream/cloudstream.git synced 2024-08-15 01:53:11 +00:00
This commit is contained in:
Luna712 2024-07-24 15:17:55 -06:00 committed by GitHub
parent 78734fbb13
commit adad529949
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions
app/src/main/java/com/lagradost/cloudstream3/ui/download

View file

@ -72,6 +72,14 @@ class DownloadChildFragment : Fragment() {
downloadsViewModel.setIsMultiDeleteState(false)
}
/**
* We have to make sure selected items are
* cleared here as well so we don't run in an
* inconsistent state where selected items do
* not match the multi delete state we are in.
*/
downloadsViewModel.clearSelectedItems()
val folder = arguments?.getString("folder")
val name = arguments?.getString("name")
if (folder == null) {

View file

@ -105,6 +105,14 @@ class DownloadFragment : Fragment() {
downloadsViewModel.setIsMultiDeleteState(false)
}
/**
* We have to make sure selected items are
* cleared here as well so we don't run in an
* inconsistent state where selected items do
* not match the multi delete state we are in.
*/
downloadsViewModel.clearSelectedItems()
observe(downloadsViewModel.headerCards) {
(binding?.downloadList?.adapter as? DownloadAdapter)?.submitList(it)
binding?.downloadLoading?.isVisible = false