[Android] Don't display loading wheel if not needed

Geoffrey Métais git at videolan.org
Wed Dec 24 11:43:24 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 24 11:00:05 2014 +0100| [a53fdf6e45461d623398921e4d39e4c28ad60aa0] | committer: Geoffrey Métais

Don't display loading wheel if not needed

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a53fdf6e45461d623398921e4d39e4c28ad60aa0
---

 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java       |    4 +++-
 1 file changed, 3 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 5ed5097..42948df 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -524,7 +524,9 @@ public class AudioBrowserFragment extends Fragment implements SwipeRefreshLayout
                     fragment.updateLists();
                     break;
                 case MSG_LOADING:
-                    fragment.mSwipeRefreshLayout.setRefreshing(true);
+                    if (fragment.mArtistsAdapter.isEmpty() && fragment.mAlbumsAdapter.isEmpty() &&
+                            fragment.mSongsAdapter.isEmpty() && fragment.mGenresAdapter.isEmpty())
+                        fragment.mSwipeRefreshLayout.setRefreshing(true);
             }
         }
     };



More information about the Android mailing list