Commit 0c911397 authored by Geoffrey Métais's avatar Geoffrey Métais

Do not refresh videos list everytime

parent 3c3a37b3
......@@ -174,15 +174,19 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
@Override
public void onResume() {
super.onResume();
//Get & set times
HashMap<String, Long> times = MediaDatabase.getInstance().getVideoTimes(getActivity());
mVideoAdapter.setTimes(times);
mVideoAdapter.notifyDataSetChanged();
updateList();
final boolean refresh = mVideoAdapter.isEmpty();
if (refresh){
updateList();
//Get & set times
HashMap<String, Long> times = MediaDatabase.getInstance().getVideoTimes(getActivity());
mVideoAdapter.setTimes(times);
mVideoAdapter.notifyDataSetChanged();
}
mMediaLibrary.addUpdateHandler(mHandler);
mGridView.setSelection(mGVFirstVisiblePos);
updateViewMode();
mAnimator.animate();
if (refresh)
mAnimator.animate();
/* Start the thumbnailer */
if (mThumbnailer != null)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment