Commit e3b0919d authored by Geoffrey Métais's avatar Geoffrey Métais

Safer videos grid refresh

parent e9102094
......@@ -420,10 +420,16 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
}
}
mVideoAdapter.addAll(displayList);
mVideoAdapter.sort();
if (mReadyToDisplay)
display();
mGridView.post(new Runnable() {
@Override
public void run() {
mVideoAdapter.clear();
mVideoAdapter.addAll(displayList);
mVideoAdapter.sort();
if (mReadyToDisplay)
display();
}
});
if (mThumbnailer != null && !jobsList.isEmpty()) {
for (MediaWrapper item : jobsList)
mThumbnailer.addJob(item);
......
......@@ -233,7 +233,6 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
}
public void addAll(Collection<MediaWrapper> items) {
mVideos.clear();
mVideos.addAll(items);
MediaWrapper mw;
Object[] array = items.toArray();
......
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