Skip to content
Snippets Groups Projects
Commit 2da55022 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

VideoGrid: fix glitches when refreshing

Don't clear adapter from an other thread...
parent 98d4bd59
No related branches found
No related tags found
No related merge requests found
......@@ -412,17 +412,16 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
else
Log.w(TAG, "Can't generate thumbnails, the thumbnailer is missing");
mVideoAdapter.setNotifyOnChange(true);
mVideoAdapter.clear();
if (itemList.size() > 0) {
new Thread(new Runnable() {
@Override
public void run() {
mVideoAdapter.setNotifyOnChange(false);
mVideoAdapter.clear();
if (mGroup != null || itemList.size() <= 10) {
for (MediaWrapper item : itemList) {
if (mGroup == null || item.getTitle().startsWith(mGroup)) {
mVideoAdapter.setNotifyOnChange(false);
mVideoAdapter.add(item);
if (mThumbnailer != null)
mThumbnailer.addJob(item);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment