Fix bug where dream preview image s not reset.

When the view is recycled, there may be an old preview image in the view
which should be cleared.

Bug: 222705951
Test: locally on device
Change-Id: I4bb1c176a9a6d04fd41780fa2da09ca685b87d26
This commit is contained in:
Lucas Silva
2022-03-04 15:35:26 -05:00
parent a10dc5280d
commit eddf2b1345

View File

@@ -84,6 +84,9 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
mPreviewView.setImageDrawable(previewImage);
mPreviewView.setClipToOutline(true);
mPreviewPlaceholderView.setVisibility(View.GONE);
} else {
mPreviewView.setImageDrawable(null);
mPreviewPlaceholderView.setVisibility(View.VISIBLE);
}
final Drawable icon = item.isActive()