From 74173317dec36b9381436737eaf6a160bf7fd5fc Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Fri, 23 Jul 2021 19:43:25 +0200 Subject: [PATCH] Change heart color to be red, add else clause for non hearted comments, and apply some code style suggestions. --- .../info_list/holder/CommentsMiniInfoItemHolder.java | 4 +++- app/src/main/res/drawable-night/ic_heart.xml | 2 +- app/src/main/res/drawable/ic_heart.xml | 1 + app/src/main/res/layout/list_comments_item.xml | 8 ++++---- app/src/main/res/values/dimens.xml | 3 +-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java index de6159ba0..7c4f67267 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java @@ -82,7 +82,7 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { itemDislikesCountView = itemView.findViewById(R.id.detail_thumbs_down_count_view); itemPublishedTime = itemView.findViewById(R.id.itemPublishedTime); itemContentView = itemView.findViewById(R.id.itemCommentContentView); - itemHeartView = itemView.findViewById(R.id.detail_heart_img_view); + itemHeartView = itemView.findViewById(R.id.detail_heart_image_view); downloadThumbnailKey = infoItemBuilder.getContext(). getString(R.string.download_thumbnail_key); @@ -157,6 +157,8 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { if (item.isHeartedByUploader()) { itemHeartView.setVisibility(View.VISIBLE); + } else { + itemHeartView.setVisibility(View.GONE); } itemView.setOnClickListener(view -> { diff --git a/app/src/main/res/drawable-night/ic_heart.xml b/app/src/main/res/drawable-night/ic_heart.xml index 49bf17297..6128a3d0d 100644 --- a/app/src/main/res/drawable-night/ic_heart.xml +++ b/app/src/main/res/drawable-night/ic_heart.xml @@ -1,7 +1,7 @@ 16dp 18sp 18sp - 18sp - 18sp + 18sp 70dp 35dp 60dp