[Android] Copy media lists for DiffUtil comparison

Geoffrey Métais git at videolan.org
Wed May 31 15:50:45 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed May 31 15:48:58 2017 +0200| [cdbc7a0552535f29c1b0aee11f60f78cccb2dd6d] | committer: Geoffrey Métais

Copy media lists for DiffUtil comparison

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index 931b830d1..a84c8b47d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -520,8 +520,8 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
     private class VideoItemDiffCallback extends DiffUtil.Callback {
         ArrayList<MediaWrapper> oldList, newList;
         VideoItemDiffCallback(ArrayList<MediaWrapper> oldList, ArrayList<MediaWrapper> newList) {
-            this.oldList = oldList;
-            this.newList = newList;
+            this.oldList = new ArrayList<>(oldList);
+            this.newList = new ArrayList<>(newList);
         }
 
         @Override



More information about the Android mailing list