aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-01-27 15:12:54 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-01-27 15:12:54 +0000
commitda0135a0344e58b3be368b591e1275d5d8d55f3b (patch)
treec5c96c25103833bb8c093c6bd4b8aa21cb87dbea /app
parent73af4090998d6c9465c6a64d30499d713b3b3859 (diff)
downloadinfinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.tar
infinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.tar.gz
infinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.tar.bz2
infinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.tar.lz
infinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.tar.xz
infinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.tar.zst
infinity-for-reddit-da0135a0344e58b3be368b591e1275d5d8d55f3b.zip
Fix comment icon not tinted properly.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java9
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ThemePreviewPostsFragment.java8
4 files changed, 8 insertions, 33 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java
index 781f59e1..39d79d39 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java
@@ -232,7 +232,6 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy
private boolean mFixedHeightPreviewInCard;
private boolean mHideTextPostContent;
private boolean mEasierToWatchInFullScreen;
- private Drawable mCommentIcon;
private ExoCreator mExoCreator;
private Callback mCallback;
private boolean canPlayVideo = true;
@@ -342,11 +341,6 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy
mPostIconAndInfoColor = customThemeWrapper.getPostIconAndInfoColor();
mDividerColor = customThemeWrapper.getDividerColor();
- mCommentIcon = AppCompatResources.getDrawable(activity, R.drawable.ic_comment_grey_24dp);
- if (mCommentIcon != null) {
- mCommentIcon.setTint(mPostIconAndInfoColor);
- }
-
mScale = resources.getDisplayMetrics().density;
mGlide = Glide.with(mActivity);
mMaxResolution = Integer.parseInt(mSharedPreferences.getString(SharedPreferencesUtils.POST_FEED_MAX_RESOLUTION, "5000000"));
@@ -2679,7 +2673,7 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy
scoreTextView.setTextColor(mPostIconAndInfoColor);
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
@@ -3978,7 +3972,7 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy
scoreTextView.setTextColor(mPostIconAndInfoColor);
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
divider.setBackgroundColor(mDividerColor);
@@ -5363,7 +5357,7 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy
upvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
index bb036181..45b5dd5b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
@@ -25,7 +25,6 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.appcompat.content.res.AppCompatResources;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.recyclerview.widget.ItemTouchHelper;
@@ -213,7 +212,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
private final int mPostIconAndInfoColor;
private final int mCommentColor;
- private final Drawable mCommentIcon;
private final float mScale;
private final ExoCreator mExoCreator;
private boolean canStartActivity = true;
@@ -331,11 +329,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
mPostIconAndInfoColor = customThemeWrapper.getPostIconAndInfoColor();
mCommentColor = customThemeWrapper.getCommentColor();
- mCommentIcon = AppCompatResources.getDrawable(activity, R.drawable.ic_comment_grey_24dp);
- if (mCommentIcon != null) {
- mCommentIcon.setTint(mPostIconAndInfoColor);
- }
-
mExoCreator = exoCreator;
MarkwonPlugin miscPlugin = new AbstractMarkwonPlugin() {
@@ -1593,7 +1586,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
scoreTextView.setTextColor(mPostIconAndInfoColor);
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
}
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 d2260407..b0c2d618 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -245,7 +245,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
private boolean mFixedHeightPreviewInCard;
private boolean mHideTextPostContent;
private boolean mEasierToWatchInFullScreen;
- private Drawable mCommentIcon;
private ExoCreator mExoCreator;
private Callback mCallback;
private boolean canPlayVideo = true;
@@ -366,11 +365,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
mPostIconAndInfoColor = customThemeWrapper.getPostIconAndInfoColor();
mDividerColor = customThemeWrapper.getDividerColor();
- mCommentIcon = AppCompatResources.getDrawable(activity, R.drawable.ic_comment_grey_24dp);
- if (mCommentIcon != null) {
- mCommentIcon.setTint(mPostIconAndInfoColor);
- }
-
mScale = resources.getDisplayMetrics().density;
mGlide = Glide.with(mActivity);
mMaxResolution = Integer.parseInt(mSharedPreferences.getString(SharedPreferencesUtils.POST_FEED_MAX_RESOLUTION, "5000000"));
@@ -2807,7 +2801,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
scoreTextView.setTextColor(mPostIconAndInfoColor);
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
@@ -4146,7 +4140,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
scoreTextView.setTextColor(mPostIconAndInfoColor);
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
divider.setBackgroundColor(mDividerColor);
@@ -5597,7 +5591,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
scoreTextView.setTextColor(mPostIconAndInfoColor);
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
- commentsCountButton.setIcon(mCommentIcon);
+ commentsCountButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
saveButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
shareButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ThemePreviewPostsFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ThemePreviewPostsFragment.java
index 890f38c1..a6abe151 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ThemePreviewPostsFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ThemePreviewPostsFragment.java
@@ -3,14 +3,12 @@ package ml.docilealligator.infinityforreddit.fragments;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
-import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
-import androidx.appcompat.content.res.AppCompatResources;
import androidx.fragment.app.Fragment;
import com.bumptech.glide.Glide;
@@ -77,11 +75,7 @@ public class ThemePreviewPostsFragment extends Fragment {
binding.upvoteButtonThemePreviewPostsFragment.setTextColor(customTheme.postIconAndInfoColor);
binding.downvoteButtonThemePreviewPostsFragment.setIconTint(ColorStateList.valueOf(customTheme.postIconAndInfoColor));
binding.commentsCountButtonThemePreviewPostsFragment.setTextColor(customTheme.postIconAndInfoColor);
- Drawable commentIcon = AppCompatResources.getDrawable(activity, R.drawable.ic_comment_grey_24dp);
- if (commentIcon != null) {
- commentIcon.setTint(customTheme.postIconAndInfoColor);
- }
- binding.commentsCountButtonThemePreviewPostsFragment.setCompoundDrawablesWithIntrinsicBounds(commentIcon, null, null, null);
+ binding.commentsCountButtonThemePreviewPostsFragment.setIconTint(ColorStateList.valueOf(customTheme.postIconAndInfoColor));
binding.saveButtonThemePreviewPostsFragment.setIconTint(ColorStateList.valueOf(customTheme.postIconAndInfoColor));
binding.shareButtonThemePreviewPostsFragment.setIconTint(ColorStateList.valueOf(customTheme.postIconAndInfoColor));