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

Fix video item update notification

parent 11aa8a75
No related branches found
No related tags found
No related merge requests found
......@@ -243,6 +243,7 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
int position = mVideos.indexOf(item);
if (position != -1) {
mVideos.set(position, item);
notifyItemChanged(position);
} else {
MediaWrapper mw;
for (int i = 0; i < mVideos.size(); ++i) {
......@@ -254,14 +255,13 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
}
if (position == -1) {
position = mVideos.size();
mVideos.add(item);
notifyItemChanged(position);
mVideos.add(position, item);
notifyItemInserted(position);
} else {
mVideos.add(position, item);
notifyItemRangeChanged(position, mVideos.size());
}
}
notifyItemChanged(position);
}
public void clear() {
......
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