From f414b8f2b269b787cceb858b51a4bd5cd7355b1d Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:32:37 -0400 Subject: Fix PostCompactBaseViewHolder implementation in PostRecyclerViewAdapter. --- .../adapters/PostRecyclerViewAdapter.java | 53 ++++++++++------------ 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index a2f523e8..77fecdf3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -612,7 +612,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { if (mActivity != null && getItemCount() > 0 && post.getAuthor().equals(subredditOrUserName)) { - if (iconUrl == null || iconUrl.equals("")) { + if (iconUrl == null || iconUrl.isEmpty()) { mGlide.load(R.drawable.subreddit_default_icon) .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))) .into(((PostViewHolder) holder).iconGifImageView); @@ -629,7 +629,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { if (mActivity != null && getItemCount() > 0 && post.getSubredditName().equals(subredditOrUserName)) { - if (iconUrl == null || iconUrl.equals("")) { + if (iconUrl == null || iconUrl.isEmpty()) { mGlide.load(R.drawable.subreddit_default_icon) .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))) .into(((PostViewHolder) holder).iconGifImageView); @@ -661,7 +661,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { if (mActivity != null && getItemCount() > 0) { - if (iconUrl == null || iconUrl.equals("") && authorName.equals(subredditOrUserName)) { + if (iconUrl == null || iconUrl.isEmpty() && authorName.equals(subredditOrUserName)) { mGlide.load(R.drawable.subreddit_default_icon) .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))) .into(((PostViewHolder) holder).iconGifImageView); @@ -695,7 +695,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter