[Android] History: refresh on start

Geoffrey Métais git at videolan.org
Tue Apr 30 17:24:19 CEST 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 30 17:02:45 2019 +0200| [1483eff06ec91a98b18f0f4920276cf9db9ed3f1] | committer: Geoffrey Métais

History: refresh on start

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

 .../src/org/videolan/vlc/gui/HistoryFragment.java        | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
index 54bac64ea..19c935dd2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
@@ -20,14 +20,8 @@
 package org.videolan.vlc.gui;
 
 import android.annotation.TargetApi;
-import androidx.lifecycle.Observer;
-import androidx.lifecycle.ViewModelProviders;
 import android.os.Build;
 import android.os.Bundle;
-import androidx.annotation.Nullable;
-import androidx.appcompat.view.ActionMode;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
@@ -35,6 +29,13 @@ import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
 
+import androidx.annotation.Nullable;
+import androidx.appcompat.view.ActionMode;
+import androidx.lifecycle.Observer;
+import androidx.lifecycle.ViewModelProviders;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
 import org.videolan.medialibrary.media.MediaLibraryItem;
 import org.videolan.medialibrary.media.MediaWrapper;
 import org.videolan.vlc.R;
@@ -84,7 +85,8 @@ public class HistoryFragment extends MediaBrowserFragment<HistoryModel> implemen
     }
 
     @Override
-    protected void onRestart() {
+    public void onStart() {
+        super.onStart();
         viewModel.refresh();
     }
 



More information about the Android mailing list