mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Fix the downloads empty indicator
This commit is contained in:
parent
b5e7aeb5cd
commit
fb0054d15e
@ -108,11 +108,11 @@ class DownloadsFragment : BaseFragment() {
|
|||||||
binding.downloads.adapter?.registerAdapterDataObserver(
|
binding.downloads.adapter?.registerAdapterDataObserver(
|
||||||
object : RecyclerView.AdapterDataObserver() {
|
object : RecyclerView.AdapterDataObserver() {
|
||||||
override fun onItemRangeRemoved(positionStart: Int, itemCount: Int) {
|
override fun onItemRangeRemoved(positionStart: Int, itemCount: Int) {
|
||||||
if (itemCount == 0) {
|
super.onItemRangeRemoved(positionStart, itemCount)
|
||||||
|
if (binding.downloads.adapter?.itemCount == 0) {
|
||||||
binding.downloads.visibility = View.GONE
|
binding.downloads.visibility = View.GONE
|
||||||
binding.downloadsEmpty.visibility = View.VISIBLE
|
binding.downloadsEmpty.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
super.onItemRangeRemoved(positionStart, itemCount)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user