[Android] Fix sections wrongly generated

Geoffrey Métais git at videolan.org
Tue Dec 6 19:17:19 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec  6 19:16:40 2016 +0100| [f566d843ec9564b24322ccc4478ca06d933c2264] | committer: Geoffrey Métais

Fix sections wrongly generated

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

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

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 91f22f2..a140231 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
@@ -241,7 +241,7 @@ public class AudioBrowserAdapter extends RecyclerView.Adapter<AudioBrowserAdapte
             @Override
             public void run() {
                 final MediaLibraryItem[] oldList = isEmpty() ? null : Arrays.copyOf(getAll(), getItemCount());
-                final MediaLibraryItem[] newList = generateList(items);
+                final MediaLibraryItem[] newList = hasSections() ? generateList(items) : items;
                 final DiffUtil.DiffResult result = DiffUtil.calculateDiff(new MediaItemDiffCallback(oldList, newList));
                 mContext.runOnUiThread(new Runnable() {
                     @Override



More information about the Android mailing list