Source:
private void showDiscoverData(final ReaderPostViewHolder postHolder, final ReaderPost post) { final ReaderPostDiscoverData discoverData = post.getDiscoverData(); if (discoverData == null) { postHolder.layoutDiscover.setVisibility(View.GONE); } postHolder.layoutDiscover.setVisibility(View.VISIBLE); postHolder.txtDiscover.setText(discoverData.getAttributionHtml()); switch (discoverData.getDiscoverType()) { case EDITOR_PICK: if (discoverData.hasAvatarUrl()) { postHolder.imgDiscoverAvatar.setImageUrl(GravatarUtils.fixGravatarUrl(discoverData.getAvatarUrl(), mAvatarSzSmall), WPNetworkImageView.ImageType.AVATAR); } else { postHolder.imgDiscoverAvatar.showDefaultGravatarImage(); } postHolder.layoutDiscover.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mPostSelectedListener != null) { mPostSelectedListener.onPostSelected(post); } } }); break; case SITE_PICK: if (discoverData.hasAvatarUrl()) { postHolder.imgDiscoverAvatar.setImageUrl( GravatarUtils.fixGravatarUrl(discoverData.getAvatarUrl(), mAvatarSzSmall), WPNetworkImageView.ImageType.BLAVATAR); } else { postHolder.imgDiscoverAvatar.showDefaultBlavatarImage(); } postHolder.layoutDiscover.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (discoverData.getBlogId() != 0) { ReaderActivityLauncher.showReaderBlogPreview(v.getContext(), discoverData.getBlogId()); } else if (discoverData.hasBlogUrl()) { ReaderActivityLauncher.openUrl(v.getContext(), discoverData.getBlogUrl()); } } }); break; default: postHolder.layoutDiscover.setVisibility(View.GONE); break; } }

Target:
private void showDiscoverData(final ReaderPostViewHolder postHolder, final ReaderPost post) { final ReaderPostDiscoverData discoverData = post.getDiscoverData(); if (discoverData == null) { postHolder.layoutDiscover.setVisibility(View.GONE); return; } postHolder.layoutDiscover.setVisibility(View.VISIBLE); postHolder.txtDiscover.setText(discoverData.getAttributionHtml()); switch (discoverData.getDiscoverType()) { case EDITOR_PICK: if (discoverData.hasAvatarUrl()) { postHolder.imgDiscoverAvatar.setImageUrl(GravatarUtils.fixGravatarUrl(discoverData.getAvatarUrl(), mAvatarSzSmall), WPNetworkImageView.ImageType.AVATAR); } else { postHolder.imgDiscoverAvatar.showDefaultGravatarImage(); } postHolder.layoutDiscover.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mPostSelectedListener != null) { mPostSelectedListener.onPostSelected(post); } } }); break; case SITE_PICK: if (discoverData.hasAvatarUrl()) { postHolder.imgDiscoverAvatar.setImageUrl( GravatarUtils.fixGravatarUrl(discoverData.getAvatarUrl(), mAvatarSzSmall), WPNetworkImageView.ImageType.BLAVATAR); } else { postHolder.imgDiscoverAvatar.showDefaultBlavatarImage(); } postHolder.layoutDiscover.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (discoverData.getBlogId() != 0) { ReaderActivityLauncher.showReaderBlogPreview(v.getContext(), discoverData.getBlogId()); } else if (discoverData.hasBlogUrl()) { ReaderActivityLauncher.openUrl(v.getContext(), discoverData.getBlogUrl()); } } }); break; default: postHolder.layoutDiscover.setVisibility(View.GONE); break; } }