[Android] Constants: split VIDEO_GROUP and FOLDER flags

Duncan McNamara git at videolan.org
Wed Sep 6 07:28:29 UTC 2023


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Wed Jul 19 16:17:25 2023 +0200| [cc1bdb25db2eef17efa75b48af5f9febc88253d0] | committer: Nicolas Pomepuy

Constants: split VIDEO_GROUP and FOLDER flags

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

 application/resources/src/main/java/org/videolan/resources/Constants.kt | 2 +-
 .../vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/application/resources/src/main/java/org/videolan/resources/Constants.kt b/application/resources/src/main/java/org/videolan/resources/Constants.kt
index 0d9a5d30ca..b0ab4d6460 100644
--- a/application/resources/src/main/java/org/videolan/resources/Constants.kt
+++ b/application/resources/src/main/java/org/videolan/resources/Constants.kt
@@ -242,7 +242,7 @@ const val CTX_TRACK_FLAGS = CTX_APPEND or CTX_PLAY_NEXT or CTX_DELETE or CTX_INF
 const val CTX_AUDIO_FLAGS = CTX_PLAY or CTX_APPEND or CTX_PLAY_NEXT or CTX_ADD_TO_PLAYLIST or CTX_INFORMATION or CTX_ADD_SHORTCUT
 const val CTX_PLAYLIST_ALBUM_FLAGS = CTX_AUDIO_FLAGS or CTX_DELETE or CTX_ADD_SHORTCUT
 const val CTX_PLAYLIST_ITEM_FLAGS = CTX_APPEND or CTX_PLAY_NEXT or CTX_ADD_TO_PLAYLIST or CTX_INFORMATION or CTX_DELETE or CTX_SET_RINGTONE or CTX_ADD_SHORTCUT
-const val CTX_VIDEO_GROUP_FLAGS = CTX_APPEND or CTX_MARK_ALL_AS_PLAYED
+const val CTX_VIDEO_GROUP_FLAGS = CTX_PLAY_ALL or CTX_APPEND or CTX_ADD_TO_PLAYLIST or CTX_MARK_ALL_AS_PLAYED or CTX_RENAME_GROUP or CTX_UNGROUP or CTX_ADD_GROUP
 const val CTX_FOLDER_FLAGS = CTX_PLAY or CTX_APPEND or CTX_ADD_TO_PLAYLIST or CTX_MARK_ALL_AS_PLAYED or CTX_BAN_FOLDER
 
 //Moviepedia
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 455b793ced..29345d58d4 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
@@ -589,7 +589,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
             is VideoCtxClick -> {
                 when (item) {
                     is Folder -> showContext(requireActivity(), this at VideoGridFragment, position, item, CTX_FOLDER_FLAGS or if(item.isFavorite) CTX_FAV_REMOVE else CTX_FAV_ADD)
-                    is VideoGroup -> if (item.presentCount == 0) UiTools.snackerMissing(requireActivity()) else showContext(requireActivity(), this at VideoGridFragment, position, item, CTX_FOLDER_FLAGS or CTX_RENAME_GROUP or CTX_UNGROUP or CTX_PLAY_ALL and CTX_PLAY.inv() or CTX_ADD_GROUP or if(item.isFavorite) CTX_FAV_REMOVE else CTX_FAV_ADD)
+                    is VideoGroup -> if (item.presentCount == 0) UiTools.snackerMissing(requireActivity()) else showContext(requireActivity(), this at VideoGridFragment, position, item, CTX_VIDEO_GROUP_FLAGS or if(item.isFavorite) CTX_FAV_REMOVE else CTX_FAV_ADD)
                     is MediaWrapper -> {
                         val group = item.type == MediaWrapper.TYPE_GROUP
                         var flags = if (group) CTX_VIDEO_GROUP_FLAGS else CTX_VIDEO_FLAGS



More information about the Android mailing list