mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
Merge pull request #2064 from Bnyro/close-fullscreen
hide downloads tab if already part of navbar
This commit is contained in:
commit
8de48a0d86
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user