[Android] [PATCH 06/10] Use inherited display variable and method
Geoffrey Métais
geoffrey.metais at gmail.com
Mon Apr 20 10:49:52 CEST 2015
---
.../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();
--
2.1.0
More information about the Android
mailing list