[Android] Fix browser overflow button visibility

Nicolas Pomepuy git at videolan.org
Thu Sep 16 04:04:08 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Sep 14 11:19:07 2021 +0200| [aace493d30745d20d471aaea129dbd99101a6f6a] | committer: Nicolas Pomepuy

Fix browser overflow button visibility

Fixes #2165

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

 .../vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt | 3 ++-
 .../src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt          | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
index 3a7fd13a9..8d74a2c7f 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.kt
@@ -149,7 +149,8 @@ open class BaseBrowserAdapter(val browserContainer: BrowserContainer<MediaLibrar
         val scheme = media.uri?.scheme ?: ""
         vh.bindingContainer.setHasContextMenu(((!networkRoot || isFavorite)
                 && "content" != scheme
-                && "otg" != scheme))
+                && "otg" != scheme)
+                && !multiSelectHelper.inActionMode)
         vh.bindingContainer.setFileName(if (media.type != MediaWrapper.TYPE_DIR && "file" == scheme) media.fileName else null)
         if (networkRoot || (isFavorite && getProtocol(media)?.contains("file") == false)) vh.bindingContainer.setProtocol(getProtocol(media))
         vh.bindingContainer.setCover(getIcon(media, specialIcons))
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt
index 79aa8bfae..22c5553cd 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.kt
@@ -64,7 +64,7 @@ class StorageBrowserAdapter(browserContainer: BrowserContainer<MediaLibraryItem>
             vh.bindingContainer.setItem(storage)
             updateJob?.join()
             if (updateJob?.isCancelled == true) return at launch
-            val hasContextMenu = customDirsLocation.contains(storagePath)
+            val hasContextMenu = customDirsLocation.contains(storagePath) && !multiSelectHelper.inActionMode
             val checked = browserContainer.scannedDirectory || mediaDirsLocation.containsPath(storagePath)
             vh.bindingContainer.setHasContextMenu(hasContextMenu)
             when {



More information about the Android mailing list