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

Update mediagroup item to display thumb

(cherry picked from commit 6170c96f)
parent 75189540
......@@ -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) {
......
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