[Android] Browser: Clear filenames
Geoffrey Métais
git at videolan.org
Fri Jan 18 15:50:38 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 18 15:47:46 2019 +0100| [527a802c420bcdcf3f9dc3ee7d8fabac202688af] | committer: Geoffrey Métais
Browser: Clear filenames
> https://code.videolan.org/videolan/vlc-android/commit/527a802c420bcdcf3f9dc3ee7d8fabac202688af
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index f5f524312..1802fe431 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -23,7 +23,6 @@
package org.videolan.vlc.gui.browser;
import android.annotation.TargetApi;
-import androidx.databinding.ViewDataBinding;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
@@ -50,6 +49,8 @@ import org.videolan.vlc.util.Constants;
import java.util.ArrayList;
import java.util.List;
+import androidx.databinding.ViewDataBinding;
+
import static org.videolan.medialibrary.media.MediaLibraryItem.TYPE_MEDIA;
import static org.videolan.medialibrary.media.MediaLibraryItem.TYPE_STORAGE;
@@ -125,7 +126,7 @@ public class BaseBrowserAdapter extends DiffUtilAdapter<MediaLibraryItem, BaseBr
vh.binding.setHasContextMenu((!mNetworkRoot || isFavorite)
&& !"content".equals(media.getUri().getScheme())
&& !"otg".equals(media.getUri().getScheme()));
- if (media.getType() != MediaWrapper.TYPE_DIR) vh.binding.setFilename(media.getFileName());
+ vh.binding.setFilename(media.getType() != MediaWrapper.TYPE_DIR ? media.getFileName() : null);
if (mNetworkRoot) vh.binding.setProtocol(getProtocol(media));
vh.binding.setCover(getIcon(media, mSpecialIcons));
vh.selectView(multiSelectHelper.isSelected(position));
More information about the Android
mailing list