[Android] AudioBrowserFragment: Sort by name should sort by name...

Edward Wang git at videolan.org
Thu Oct 18 02:14:37 CEST 2012


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Wed Oct 17 20:14:01 2012 -0400| [59d4d9b789906ce2a57607f92aac06a3935bc4c6] | committer: Edward Wang

AudioBrowserFragment: Sort by name should sort by name...

Close #7580

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=59d4d9b789906ce2a57607f92aac06a3935bc4c6
---

 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java   |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 337b18c..df564cc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -390,10 +390,10 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
         }
     };
 
-    private final Comparator<Media> byMRL = new Comparator<Media>() {
+    private final Comparator<Media> byName = new Comparator<Media>() {
         @Override
         public int compare(Media m1, Media m2) {
-            return String.CASE_INSENSITIVE_ORDER.compare(m1.getLocation(), m2.getLocation());
+            return String.CASE_INSENSITIVE_ORDER.compare(m1.getTitle(), m2.getTitle());
         };
     };
 
@@ -411,7 +411,7 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
         public int compare(Media m1, Media m2) {
             int res = String.CASE_INSENSITIVE_ORDER.compare(m1.getAlbum(), m2.getAlbum());
             if (res == 0)
-                res = byMRL.compare(m1, m2);
+                res = byName.compare(m1, m2);
             return res;
         };
     };
@@ -449,7 +449,7 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
             break;
         case SORT_BY_TITLE:
         default:
-            Collections.sort(audioList, byMRL);
+            Collections.sort(audioList, byName);
             break;
         }
         if(mSortReverse) {



More information about the Android mailing list