Skip to content
Snippets Groups Projects
Commit cf2f196f authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Properly update dataset in video adapter

parent c5ff66bc
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ public class VideoGridFragment extends SortableFragment<VideoListAdapter> implem
if (savedInstanceState != null) {
final List<MediaWrapper> list = (List<MediaWrapper>) VLCApplication.getData("list"+getTitle());
if (!Util.isListEmpty(list))
mAdapter.setList(list);
mAdapter.update(list);
}
mGridView.setAdapter(mAdapter);
}
......
......@@ -170,12 +170,6 @@ public class VideoListAdapter extends SortableAdapter<MediaWrapper, VideoListAda
return position;
}
@MainThread
public void setList(List<MediaWrapper> items) {
setDataset(items);
mOriginalData = null;
}
public boolean contains(MediaWrapper mw) {
return getDataset().indexOf(mw) != -1;
}
......@@ -216,7 +210,7 @@ public class VideoListAdapter extends SortableAdapter<MediaWrapper, VideoListAda
@MainThread
public void clear() {
getDataset().clear();
update(new ArrayList<MediaWrapper>());
mOriginalData = null;
}
......
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