[Android] Use inherited display variable and method

Geoffrey Métais git at videolan.org
Mon Apr 20 15:00:46 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Apr 20 13:20:25 2015 +0200| [d7498869ec53a98f9e3c55ef85e2c80dafe25015] | committer: Geoffrey Métais

Use inherited display variable and method

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

 .../src/org/videolan/vlc/gui/video/VideoGridFragment.java |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

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 0cdc730..461c6fc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -107,7 +107,6 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
 
     private MainActivity mMainActivity;
     private AudioServiceController mAudioController;
-    private boolean mReady = true;
 
     // Gridview position saved in onPause()
     private int mGVFirstVisiblePos;
@@ -458,7 +457,7 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
                                 mThumbnailer.addJob(item);
                         }
                     }
-                    if (mReady)
+                    if (mReadyToDisplay)
                         display();
                 }
             }).start();
@@ -544,21 +543,13 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
     }
 
     @Override
-    public void setReadyToDisplay(boolean ready) {
-        if (ready && !mReady)
-            display();
-        else
-            mReady = ready;
-    }
-
-    @Override
     public void display() {
         if (getActivity() != null)
             getActivity().runOnUiThread(new Runnable() {
                 @Override
                 public void run() {
                     mViewNomedia.setVisibility(mVideoAdapter.getCount()>0 ? View.GONE : View.VISIBLE);
-                    mReady = true;
+                    mReadyToDisplay = true;
                     mVideoAdapter.setNotifyOnChange(true);
                     mVideoAdapter.sort();
                     mGVFirstVisiblePos = mGridView.getFirstVisiblePosition();



More information about the Android mailing list