[Android] Fix video list refresh after playback

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


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

Fix video list refresh after playback

(cherry picked from commit 7299fddcc13929723ad24422f1ed9e16bdcec885)

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

 .../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