[Android] Simple update on pull-to-refresh action
Geoffrey Métais
git at videolan.org
Fri Nov 4 16:56:59 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Nov 4 16:56:26 2016 +0100| [792ca389e6612d7b555ac6f726e850b9db684953] | committer: Geoffrey Métais
Simple update on pull-to-refresh action
> https://code.videolan.org/videolan/vlc-android/commit/792ca389e6612d7b555ac6f726e850b9db684953
---
.../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 6 +++---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 7 ++++---
2 files changed, 7 insertions(+), 6 deletions(-)
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 f6dd221..2dccfc7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -488,9 +488,9 @@ public class AudioBrowserFragment extends MediaBrowserFragment implements Device
@Override
public void onRefresh() {
if (!mMediaLibrary.isWorking()) {
- mMediaLibrary.addDeviceDiscoveryCb(this);
- mMediaLibrary.reload();
- }
+ updateLists();
+ } else
+ mSwipeRefreshLayout.setRefreshing(false);
}
@Override
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 20fdf50..9edd733 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -466,9 +466,10 @@ public class VideoGridFragment extends MediaBrowserFragment implements MediaUpda
@Override
public void onRefresh() {
- if (getActivity() != null && !VLCApplication.getMLInstance().isWorking()) {
- VLCApplication.getMLInstance().reload();
- }
+ if (!VLCApplication.getMLInstance().isWorking())
+ updateList();
+ else
+ mSwipeRefreshLayout.setRefreshing(false);
}
@Override
More information about the Android
mailing list