[Android] Fix video list refresh after playback

Geoffrey Métais git at videolan.org
Tue Nov 7 13:22:46 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov  7 13:22:06 2017 +0100| [7299fddcc13929723ad24422f1ed9e16bdcec885] | committer: Geoffrey Métais

Fix video list refresh after playback

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

 .../src/org/videolan/vlc/gui/video/VideoGridFragment.java  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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 c61401895..b78e48f6d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -155,6 +155,20 @@ public class VideoGridFragment extends SortableFragment<VideoListAdapter> implem
     }
 
     @Override
+    public void onResume() {
+        super.onResume();
+        if (restart)
+            updateList();
+    }
+
+    private boolean restart = false;
+    @Override
+    public void onPause() {
+        super.onPause();
+        restart = true;
+    }
+
+    @Override
     public void onHiddenChanged(boolean hidden) {
         super.onHiddenChanged(hidden);
         if (!hidden) {



More information about the Android mailing list