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

Update mediagroup item to display thumb

(cherry picked from commit 6170c96f)
parent 75189540
No related branches found
Tags 2.2.1-pre1
No related merge requests found
......@@ -469,6 +469,20 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
public void setItemToUpdate(MediaWrapper item) {
if (mVideoAdapter.contains(item))
mHandler.sendMessage(mHandler.obtainMessage(MediaLibrary.UPDATE_ITEM, item));
else // Update group item when its first element is updated
for (int i = 0; i < mVideoAdapter.getItemCount(); ++i) {
if (mVideoAdapter.getItem(i) instanceof MediaGroup &&
((MediaGroup)mVideoAdapter.getItem(i)).getFirstMedia().equals(item)) {
final int position = i;
mHandler.post(new Runnable() {
@Override
public void run() {
mVideoAdapter.notifyItemChanged(position);
}
});
return;
}
}
}
public void setGroup(String prefix) {
......
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