[Android] Ctx option, show "play" instead of "play as audio" for non media files
Nicolas Pomepuy
git at videolan.org
Wed Aug 5 14:25:24 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Aug 4 09:56:37 2020 +0200| [66cd292290a074c43d4a86a3018f453f10bcfefc] | committer: Nicolas Pomepuy
Ctx option, show "play" instead of "play as audio" for non media files
Fixes #1441
> https://code.videolan.org/videolan/vlc-android/commit/66cd292290a074c43d4a86a3018f453f10bcfefc
---
.../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
index b56049820..a9f043e14 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
@@ -521,7 +521,8 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
val isAudio = mw.type == MediaWrapper.TYPE_AUDIO
val isMedia = isVideo || isAudio
if (isMedia) flags = flags or CTX_PLAY_ALL or CTX_APPEND or CTX_INFORMATION or CTX_ADD_TO_PLAYLIST
- if (!isAudio) flags = flags or CTX_PLAY_AS_AUDIO
+ if (!isAudio && isMedia) flags = flags or CTX_PLAY_AS_AUDIO
+ if (!isMedia) flags = flags or CTX_PLAY
if (isVideo) flags = flags or CTX_DOWNLOAD_SUBTITLES
}
if (flags != 0L) showContext(requireActivity(), this at BaseBrowserFragment, position, item.getTitle(), flags)
More information about the Android
mailing list