[Android] Restore delete context action in file browser
Geoffrey Métais
git at videolan.org
Wed Aug 1 10:30:03 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jul 31 18:19:05 2018 +0200| [560085a484118b5e25db91283644b9e6db8f4afe] | committer: Geoffrey Métais
Restore delete context action in file browser
> https://code.videolan.org/videolan/vlc-android/commit/560085a484118b5e25db91283644b9e6db8f4afe
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
index 13af86927..b71be0b09 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
@@ -48,6 +48,7 @@ import org.videolan.vlc.gui.dialogs.CtxActionReceiver
import org.videolan.vlc.gui.dialogs.SavePlaylistDialog
import org.videolan.vlc.gui.dialogs.showContext
import org.videolan.vlc.gui.helpers.UiTools
+import org.videolan.vlc.gui.helpers.hf.OTG_SCHEME
import org.videolan.vlc.gui.network.MRLPanelFragment.KEY_MRL
import org.videolan.vlc.interfaces.IEventsHandler
import org.videolan.vlc.interfaces.IRefreshable
@@ -392,7 +393,8 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
override fun onCtxClick(v: View, position: Int, item: MediaLibraryItem) {
if (mActionMode == null && item.itemType == MediaLibraryItem.TYPE_MEDIA) uiJob(false) {
val mw = item as MediaWrapper
- var flags = 0
+ if (mw.uri.scheme == "content" || mw.uri.scheme == OTG_SCHEME) return at uiJob
+ var flags = if (!isRootDirectory && this at BaseBrowserFragment is FileBrowserFragment) Constants.CTX_DELETE else 0
if (!isRootDirectory && this is FileBrowserFragment) flags = flags or Constants.CTX_DELETE
if (mw.type == MediaWrapper.TYPE_DIR) {
val isEmpty = viewModel.isFolderEmpty(mw)
More information about the Android
mailing list