diff options
Diffstat (limited to '')
4 files changed, 15 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index 53edff81..9ea07970 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -114,6 +114,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi private boolean mShowAbsoluteNumberOfVotes; private boolean mFullyCollapseComment; private boolean mShowOnlyOneCommentLevelIndicator; + private boolean mHideCommentAwards; private CommentRecyclerViewAdapterCallback mCommentRecyclerViewAdapterCallback; private boolean isInitiallyLoading; private boolean isInitiallyLoadingFailed; @@ -233,10 +234,9 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi mSwapTapAndLong = sharedPreferences.getBoolean(SharedPreferencesUtils.SWAP_TAP_AND_LONG_COMMENTS, false); mShowCommentDivider = sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_COMMENT_DIVIDER, false); mShowAbsoluteNumberOfVotes = sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_ABSOLUTE_NUMBER_OF_VOTES, true); - mFullyCollapseComment = sharedPreferences.getBoolean(SharedPreferencesUtils.FULLY_COLLAPSE_COMMENT, false); - mShowOnlyOneCommentLevelIndicator = sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_ONLY_ONE_COMMENT_LEVEL_INDICATOR, false); + mHideCommentAwards = sharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_COMMENT_AWARDS, false); mCommentRecyclerViewAdapterCallback = commentRecyclerViewAdapterCallback; isInitiallyLoading = true; @@ -437,7 +437,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi ((CommentViewHolder) holder).topScoreTextView.setVisibility(View.GONE); } - if (comment.getAwards() != null && !comment.getAwards().equals("")) { + if (!mHideCommentAwards && comment.getAwards() != null && !comment.getAwards().equals("")) { ((CommentViewHolder) holder).awardsTextView.setVisibility(View.VISIBLE); Utils.setHTMLWithImageToTextView(((CommentViewHolder) holder).awardsTextView, comment.getAwards(), true); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java index 74dc9a7f..7291de2c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java @@ -202,6 +202,7 @@ public class SharedPreferencesUtils { public static final String PINCH_TO_ZOOM_VIDEO = "pinch_to_zoom_video"; public static final String FIXED_HEIGHT_PREVIEW_IN_CARD = "fixed_height_preview_in_card"; public static final String HIDE_TEXT_POST_CONTENT = "hide_text_post_content"; + public static final String HIDE_COMMENT_AWARDS = "hide_comment_awards"; public static final String DEFAULT_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit_preferences"; public static final String MAIN_PAGE_TABS_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.main_page_tabs"; diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8751ce69..148fedc6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -626,6 +626,7 @@ <string name="settings_custom_content_font_family_title">Custom Content Font Family</string> <string name="settings_fixed_height_preview_in_card_title">Fixed Height in Card</string> <string name="settings_hide_text_post_content">Hide Text Post Content</string> + <string name="settings_hide_comment_awards_title">Hide Comment Awards</string> <string name="no_link_available">Cannot get the link</string> diff --git a/app/src/main/res/xml/comment_preferences.xml b/app/src/main/res/xml/comment_preferences.xml index db82bde9..55d48db9 100644 --- a/app/src/main/res/xml/comment_preferences.xml +++ b/app/src/main/res/xml/comment_preferences.xml @@ -32,4 +32,14 @@ app:key="fully_collapse_comment" android:title="@string/settings_fully_collapse_comment_title" /> + <ml.docilealligator.infinityforreddit.customviews.CustomFontSwitchPreference + app:defaultValue="false" + app:key="fully_collapse_comment" + android:title="@string/settings_fully_collapse_comment_title" /> + + <ml.docilealligator.infinityforreddit.customviews.CustomFontSwitchPreference + app:defaultValue="false" + app:key="hide_comment_awards" + android:title="@string/settings_hide_comment_awards_title" /> + </PreferenceScreen>
\ No newline at end of file |