[Android] Revert "Inside a video group, display the title without the group name"

Geoffrey Métais git at videolan.org
Mon Dec 4 15:26:30 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec  4 15:05:01 2017 +0100| [aad4bf5101bf8d22251eef680f647131e609e4fe] | committer: Geoffrey Métais

Revert "Inside a video group, display the title without the group name"

This reverts commit 71e6ca9cda7385dfcec569b1564ba83732329acb.

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index fb460fa21..b78e48f6d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -74,7 +74,6 @@ import org.videolan.vlc.util.Util;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.regex.Pattern;
 
 public class VideoGridFragment extends SortableFragment<VideoListAdapter> implements MediaUpdatedCb, SwipeRefreshLayout.OnRefreshListener, MediaAddedCb, Filterable, IEventsHandler {
 
@@ -366,11 +365,8 @@ public class VideoGridFragment extends SortableFragment<VideoListAdapter> implem
                 if (mGroup != null) {
                     for (MediaWrapper item : itemList) {
                         String title = item.getTitle().substring(item.getTitle().toLowerCase().startsWith("the") ? 4 : 0);
-                        if (title.toLowerCase().startsWith(mGroup.toLowerCase())) {
-                            //Display title without the group name
-                            item.setDisplayTitle(title.replaceFirst(Pattern.quote(mGroup), "\u2026"));
+                        if (mGroup == null || title.toLowerCase().startsWith(mGroup.toLowerCase()))
                             displayList.add(item);
-                        }
                     }
                 } else {
                     for (MediaGroup item : MediaGroup.group(itemList))



More information about the Android mailing list