[Android] Remove unnecessary sorting

Geoffrey Métais git at videolan.org
Mon Feb 22 14:51:46 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 22 11:05:11 2016 +0100| [8c823363876ef5d7f2b6fb456fe8e13c72c96a98] | committer: Geoffrey Métais

Remove unnecessary sorting

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

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

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 45fee68..ebcd02b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -800,7 +800,8 @@ public class AudioBrowserFragment extends MediaBrowserFragment implements SwipeR
                     updateAlbums, updateSongs, updateGenres, updatePlaylists));
 
             //process the visible list first
-            tasks.add(0, tasks.remove(mViewPager.getCurrentItem()));
+            if (mViewPager.getCurrentItem() != 0)
+                tasks.add(0, tasks.remove(mViewPager.getCurrentItem()));
             tasks.add(new Runnable() {
                 @Override
                 public void run() {



More information about the Android mailing list