[Android] Avoid showing grouping options on non root grid

Nicolas Pomepuy git at videolan.org
Tue Oct 1 14:33:40 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Thu Sep 26 11:13:12 2019 +0200| [4c5913be035ec4e493a3672c8ad4c89a44ed6ba0] | committer: Geoffrey Métais

Avoid showing grouping options on non root grid

> https://code.videolan.org/videolan/vlc-android/commit/4c5913be035ec4e493a3672c8ad4c89a44ed6ba0
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
index f59cea7cb..772d48c3d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -123,7 +123,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
     override fun onPrepareOptionsMenu(menu: Menu) {
         super.onPrepareOptionsMenu(menu)
         menu.findItem(R.id.ml_menu_last_playlist).isVisible = true
-        menu.findItem(R.id.ml_menu_video_group).isVisible = true
+        menu.findItem(R.id.ml_menu_video_group).isVisible = viewModel.group == null && viewModel.folder == null
         val displayInCards = Settings.getInstance(requireActivity()).getBoolean("video_display_in_cards", true)
         menu.findItem(R.id.ml_menu_display_grid).isVisible = displayInCards
         menu.findItem(R.id.ml_menu_display_list).isVisible = !displayInCards



More information about the Android mailing list