[Android] Fix sort issue

David Papazian git at videolan.org
Tue Aug 29 15:17:36 CEST 2017


vlc-android | branch: master | David Papazian <david.papazian at metz.supelec.fr> | Tue Aug 29 14:16:54 2017 +0200| [53032c655486c54752d88a662ed1b26822702563] | committer: Geoffrey Métais

Fix sort issue

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

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

 vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
index fb17d8255..1e9d627dd 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
@@ -349,6 +349,8 @@ public class AudioBrowserAdapter extends SortableAdapter<MediaLibraryItem, Audio
     }
 
     protected ArrayList<MediaLibraryItem> prepareList(ArrayList<MediaLibraryItem> items) {
+        if (!isSortAllowed(getSortBy()))
+            sMediaComparator.setSortDefault();
         if (mMakeSections) {
             if (sMediaComparator.sortBy == MediaLibraryItemComparator.SORT_DEFAULT) {
                 return generateSections(items, getDefaultSort());



More information about the Android mailing list