diff --git a/app/src/main/java/com/github/libretube/ui/fragments/LibraryFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/LibraryFragment.kt index 99051b126..a38494316 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/LibraryFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/LibraryFragment.kt @@ -21,6 +21,7 @@ import com.github.libretube.ui.adapters.PlaylistsAdapter import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.dialogs.CreatePlaylistDialog import com.github.libretube.ui.models.PlayerViewModel +import com.github.libretube.util.NavBarHelper import com.github.libretube.util.PreferenceHelper class LibraryFragment : BaseFragment() { @@ -68,6 +69,11 @@ class LibraryFragment : BaseFragment() { findNavController().navigate(R.id.downloadsFragment) } + val navBarItems = NavBarHelper.getNavBarItems(requireContext()) + if (navBarItems.filter { it.isVisible }.any { it.itemId == R.id.downloadsFragment }) { + binding.downloads.visibility = View.GONE + } + fetchPlaylists() binding.playlistRefresh.isEnabled = true