[Android] Fix group / folder opening issue

Nicolas Pomepuy git at videolan.org
Mon May 18 13:48:40 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri May 15 17:18:39 2020 +0200| [d2ce49ccb1d12498a167b9a1f2fc5fc585070020] | committer: Nicolas Pomepuy

Fix group / folder opening issue

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
index a62f1a3c2..54e3170c4 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -100,7 +100,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
             else arguments?.getParcelable(KEY_FOLDER)
             val parentGroup = if (savedInstanceState != null) savedInstanceState.getParcelable<VideoGroup>(KEY_GROUP)
                     else arguments?.getParcelable(KEY_GROUP)
-            val grouping = when (Settings.getInstance(requireContext()).getString(KEY_GROUP_VIDEOS, null) ?: GROUP_VIDEOS_NAME) {
+            val grouping = if (parentGroup != null || folder != null) VideoGroupingType.NONE else when (Settings.getInstance(requireContext()).getString(KEY_GROUP_VIDEOS, null) ?: GROUP_VIDEOS_NAME) {
                 GROUP_VIDEOS_NONE -> VideoGroupingType.NONE
                 GROUP_VIDEOS_FOLDER -> VideoGroupingType.FOLDER
                 else -> VideoGroupingType.NAME



More information about the Android mailing list