[Android] Do not refresh while medialibrary is scanning

Geoffrey Métais git at videolan.org
Fri May 27 11:28:07 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 27 10:18:04 2016 +0200| [ff4459f46169b6384760b4574377a058a989e563] | committer: Geoffrey Métais

Do not refresh while medialibrary is scanning

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index d335579..4f546d2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -175,10 +175,10 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
             mMainActivity = (MainActivity) getActivity();
         mMediaLibrary.setBrowser(this);
         mMediaLibrary.addUpdateHandler(mHandler);
-        final boolean refresh = mVideoAdapter.isEmpty();
+        final boolean refresh = mVideoAdapter.isEmpty() && !mMediaLibrary.isWorking();
         // We don't animate while medialib is scanning. Because gridview is being populated.
         // That would lead to graphical glitches
-        final boolean animate = mGroup == null && refresh && !mMediaLibrary.isWorking();
+        final boolean animate = mGroup == null && refresh;
         if (refresh)
             updateList();
         else {



More information about the Android mailing list