[Android] Use correct list for current fragment update
Geoffrey Métais
git at videolan.org
Wed Feb 14 17:36:19 CET 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 12 12:12:44 2018 +0100| [32866f871824ea7f69ba1066460304ef790f79c2] | committer: Geoffrey Métais
Use correct list for current fragment update
(cherry picked from commit e57e5247882121b8dc78437ffbdb9224494889a0)
> https://code.videolan.org/videolan/vlc-android/commit/32866f871824ea7f69ba1066460304ef790f79c2
---
vlc-android/src/org/videolan/vlc/SortableAdapter.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/SortableAdapter.java b/vlc-android/src/org/videolan/vlc/SortableAdapter.java
index 8292856d4..238c20c95 100644
--- a/vlc-android/src/org/videolan/vlc/SortableAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/SortableAdapter.java
@@ -6,7 +6,6 @@ import android.support.v7.widget.RecyclerView;
import org.jetbrains.annotations.NotNull;
import org.videolan.medialibrary.media.MediaLibraryItem;
import org.videolan.vlc.gui.DiffUtilAdapter;
-import org.videolan.vlc.util.MediaItemDiffCallback;
import org.videolan.vlc.util.MediaLibraryItemComparator;
import org.videolan.vlc.util.Util;
@@ -38,8 +37,7 @@ public abstract class SortableAdapter<T extends MediaLibraryItem, VH extends Rec
}
public void updateIfSortChanged() {
- if (!hasPendingUpdates() && hasSortChanged())
- update(new ArrayList<>(getDataset()));
+ if (!hasPendingUpdates() && hasSortChanged()) update(new ArrayList<>(peekLast()));
}
private boolean hasSortChanged() {
More information about the Android
mailing list