mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-08-18 11:03:26 +00:00
Remove Show Fewer Toolbar Options Starting From.
This commit is contained in:
@ -125,7 +125,7 @@ public class CommentsRecyclerViewAdapterNew extends ListAdapter<Comment, Recycle
|
|||||||
private final boolean mNeedBlurNsfw;
|
private final boolean mNeedBlurNsfw;
|
||||||
private final boolean mDoNotBlurNsfwInNsfwSubreddits;
|
private final boolean mDoNotBlurNsfwInNsfwSubreddits;
|
||||||
private final boolean mNeedBlurSpoiler;
|
private final boolean mNeedBlurSpoiler;
|
||||||
private final int mDepthThreshold;
|
//private final int mDepthThreshold;
|
||||||
private final CommentRecyclerViewAdapterCallback mCommentRecyclerViewAdapterCallback;
|
private final CommentRecyclerViewAdapterCallback mCommentRecyclerViewAdapterCallback;
|
||||||
private final Drawable expandDrawable;
|
private final Drawable expandDrawable;
|
||||||
private final Drawable collapseDrawable;
|
private final Drawable collapseDrawable;
|
||||||
@ -319,7 +319,7 @@ public class CommentsRecyclerViewAdapterNew extends ListAdapter<Comment, Recycle
|
|||||||
mShowAuthorAvatar = sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_AUTHOR_AVATAR, false);
|
mShowAuthorAvatar = sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_AUTHOR_AVATAR, false);
|
||||||
mAlwaysShowChildCommentCount = sharedPreferences.getBoolean(SharedPreferencesUtils.ALWAYS_SHOW_CHILD_COMMENT_COUNT, false);
|
mAlwaysShowChildCommentCount = sharedPreferences.getBoolean(SharedPreferencesUtils.ALWAYS_SHOW_CHILD_COMMENT_COUNT, false);
|
||||||
mHideTheNumberOfVotes = sharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_VOTES_IN_COMMENTS, false);
|
mHideTheNumberOfVotes = sharedPreferences.getBoolean(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_VOTES_IN_COMMENTS, false);
|
||||||
mDepthThreshold = sharedPreferences.getInt(SharedPreferencesUtils.SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD, 5);
|
//mDepthThreshold = sharedPreferences.getInt(SharedPreferencesUtils.SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD, 5);
|
||||||
|
|
||||||
mCommentRecyclerViewAdapterCallback = commentRecyclerViewAdapterCallback;
|
mCommentRecyclerViewAdapterCallback = commentRecyclerViewAdapterCallback;
|
||||||
|
|
||||||
@ -507,13 +507,13 @@ public class CommentsRecyclerViewAdapterNew extends ListAdapter<Comment, Recycle
|
|||||||
|
|
||||||
((CommentBaseViewHolder) holder).commentIndentationView.setShowOnlyOneDivider(mShowOnlyOneCommentLevelIndicator);
|
((CommentBaseViewHolder) holder).commentIndentationView.setShowOnlyOneDivider(mShowOnlyOneCommentLevelIndicator);
|
||||||
((CommentBaseViewHolder) holder).commentIndentationView.setLevelAndColors(comment.getDepth(), verticalBlockColors);
|
((CommentBaseViewHolder) holder).commentIndentationView.setLevelAndColors(comment.getDepth(), verticalBlockColors);
|
||||||
if (comment.getDepth() >= mDepthThreshold) {
|
/*if (comment.getDepth() >= mDepthThreshold) {
|
||||||
((CommentBaseViewHolder) holder).saveButton.setVisibility(View.GONE);
|
((CommentBaseViewHolder) holder).saveButton.setVisibility(View.GONE);
|
||||||
((CommentBaseViewHolder) holder).replyButton.setVisibility(View.GONE);
|
((CommentBaseViewHolder) holder).replyButton.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
((CommentBaseViewHolder) holder).saveButton.setVisibility(View.VISIBLE);
|
((CommentBaseViewHolder) holder).saveButton.setVisibility(View.VISIBLE);
|
||||||
((CommentBaseViewHolder) holder).replyButton.setVisibility(View.VISIBLE);
|
((CommentBaseViewHolder) holder).replyButton.setVisibility(View.VISIBLE);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (comment.hasReply()) {
|
if (comment.hasReply()) {
|
||||||
if (comment.getChildCount() > 0 && (mAlwaysShowChildCommentCount || !comment.isExpanded())) {
|
if (comment.getChildCount() > 0 && (mAlwaysShowChildCommentCount || !comment.isExpanded())) {
|
||||||
|
|||||||
@ -248,6 +248,7 @@ public class AdvancedPreferenceFragment extends CustomFontPreferenceFragmentComp
|
|||||||
editor.remove(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_AWARDS_LEGACY);
|
editor.remove(SharedPreferencesUtils.HIDE_THE_NUMBER_OF_AWARDS_LEGACY);
|
||||||
editor.remove(SharedPreferencesUtils.HIDE_COMMENT_AWARDS_LEGACY);
|
editor.remove(SharedPreferencesUtils.HIDE_COMMENT_AWARDS_LEGACY);
|
||||||
editor.remove(SharedPreferencesUtils.IMMERSIVE_INTERFACE_IGNORE_NAV_BAR_KEY_LEGACY);
|
editor.remove(SharedPreferencesUtils.IMMERSIVE_INTERFACE_IGNORE_NAV_BAR_KEY_LEGACY);
|
||||||
|
editor.remove(SharedPreferencesUtils.SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD);
|
||||||
|
|
||||||
SharedPreferences.Editor sortTypeEditor = mSortTypeSharedPreferences.edit();
|
SharedPreferences.Editor sortTypeEditor = mSortTypeSharedPreferences.edit();
|
||||||
sortTypeEditor.remove(SharedPreferencesUtils.SORT_TYPE_ALL_POST_LEGACY);
|
sortTypeEditor.remove(SharedPreferencesUtils.SORT_TYPE_ALL_POST_LEGACY);
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import javax.inject.Named;
|
|||||||
import ml.docilealligator.infinityforreddit.Infinity;
|
import ml.docilealligator.infinityforreddit.Infinity;
|
||||||
import ml.docilealligator.infinityforreddit.R;
|
import ml.docilealligator.infinityforreddit.R;
|
||||||
import ml.docilealligator.infinityforreddit.customviews.preference.CustomFontPreferenceFragmentCompat;
|
import ml.docilealligator.infinityforreddit.customviews.preference.CustomFontPreferenceFragmentCompat;
|
||||||
import ml.docilealligator.infinityforreddit.customviews.preference.SliderPreference;
|
|
||||||
import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils;
|
import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils;
|
||||||
|
|
||||||
public class CommentPreferenceFragment extends CustomFontPreferenceFragmentCompat {
|
public class CommentPreferenceFragment extends CustomFontPreferenceFragmentCompat {
|
||||||
@ -29,7 +28,7 @@ public class CommentPreferenceFragment extends CustomFontPreferenceFragmentCompa
|
|||||||
|
|
||||||
SwitchPreference showCommentDividerSwitchPreference = findPreference(SharedPreferencesUtils.SHOW_COMMENT_DIVIDER);
|
SwitchPreference showCommentDividerSwitchPreference = findPreference(SharedPreferencesUtils.SHOW_COMMENT_DIVIDER);
|
||||||
ListPreference commentDividerTypeListPreference = findPreference(SharedPreferencesUtils.COMMENT_DIVIDER_TYPE);
|
ListPreference commentDividerTypeListPreference = findPreference(SharedPreferencesUtils.COMMENT_DIVIDER_TYPE);
|
||||||
SliderPreference showFewerToolbarOptionsThresholdSliderPreference = findPreference(SharedPreferencesUtils.SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD);
|
//SliderPreference showFewerToolbarOptionsThresholdSliderPreference = findPreference(SharedPreferencesUtils.SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD);
|
||||||
|
|
||||||
if (showCommentDividerSwitchPreference != null && commentDividerTypeListPreference != null) {
|
if (showCommentDividerSwitchPreference != null && commentDividerTypeListPreference != null) {
|
||||||
commentDividerTypeListPreference.setVisible(sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_COMMENT_DIVIDER, false));
|
commentDividerTypeListPreference.setVisible(sharedPreferences.getBoolean(SharedPreferencesUtils.SHOW_COMMENT_DIVIDER, false));
|
||||||
@ -39,8 +38,8 @@ public class CommentPreferenceFragment extends CustomFontPreferenceFragmentCompa
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showFewerToolbarOptionsThresholdSliderPreference != null) {
|
/*if (showFewerToolbarOptionsThresholdSliderPreference != null) {
|
||||||
showFewerToolbarOptionsThresholdSliderPreference.setSummaryTemplate(R.string.settings_show_fewer_toolbar_options_threshold_summary);
|
showFewerToolbarOptionsThresholdSliderPreference.setSummaryTemplate(R.string.settings_show_fewer_toolbar_options_threshold_summary);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,7 +211,6 @@ public class SharedPreferencesUtils {
|
|||||||
public static final String PINCH_TO_ZOOM_VIDEO = "pinch_to_zoom_video";
|
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 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_TEXT_POST_CONTENT = "hide_text_post_content";
|
||||||
public static final String SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD = "show_fewer_toolbar_options_threshold";
|
|
||||||
public static final String SHOW_AUTHOR_AVATAR = "show_author_avatar";
|
public static final String SHOW_AUTHOR_AVATAR = "show_author_avatar";
|
||||||
public static final String ALWAYS_SHOW_CHILD_COMMENT_COUNT = "always_show_child_comment_count";
|
public static final String ALWAYS_SHOW_CHILD_COMMENT_COUNT = "always_show_child_comment_count";
|
||||||
public static final String HIDE_UPVOTE_RATIO = "hide_upvote_ratio";
|
public static final String HIDE_UPVOTE_RATIO = "hide_upvote_ratio";
|
||||||
@ -483,6 +482,7 @@ public class SharedPreferencesUtils {
|
|||||||
public static final String HIDE_THE_NUMBER_OF_AWARDS_LEGACY = "hide_the_number_of_awards";
|
public static final String HIDE_THE_NUMBER_OF_AWARDS_LEGACY = "hide_the_number_of_awards";
|
||||||
public static final String HIDE_COMMENT_AWARDS_LEGACY = "hide_comment_awards";
|
public static final String HIDE_COMMENT_AWARDS_LEGACY = "hide_comment_awards";
|
||||||
public static final String IMMERSIVE_INTERFACE_IGNORE_NAV_BAR_KEY_LEGACY = "immersive_interface_ignore_nav_bar";
|
public static final String IMMERSIVE_INTERFACE_IGNORE_NAV_BAR_KEY_LEGACY = "immersive_interface_ignore_nav_bar";
|
||||||
|
public static final String SHOW_FEWER_TOOLBAR_OPTIONS_THRESHOLD = "show_fewer_toolbar_options_threshold";
|
||||||
|
|
||||||
//Current account
|
//Current account
|
||||||
public static final String APPLICATION_ONLY_ACCESS_TOKEN_LEGACY = "app_only_access_token";
|
public static final String APPLICATION_ONLY_ACCESS_TOKEN_LEGACY = "app_only_access_token";
|
||||||
|
|||||||
@ -56,12 +56,12 @@
|
|||||||
app:key="hide_the_number_of_votes_in_comments"
|
app:key="hide_the_number_of_votes_in_comments"
|
||||||
app:title="@string/settings_hide_the_number_of_votes" />
|
app:title="@string/settings_hide_the_number_of_votes" />
|
||||||
|
|
||||||
<ml.docilealligator.infinityforreddit.customviews.preference.SliderPreference
|
<!--<ml.docilealligator.infinityforreddit.customviews.preference.SliderPreference
|
||||||
app:defaultValue="5"
|
app:defaultValue="5"
|
||||||
app:sliderMax="10"
|
app:sliderMax="10"
|
||||||
app:key="show_fewer_toolbar_options_threshold"
|
app:key="show_fewer_toolbar_options_threshold"
|
||||||
app:title="@string/settings_show_fewer_toolbar_options_threshold_title"
|
app:title="@string/settings_show_fewer_toolbar_options_threshold_title"
|
||||||
app:singleLineTitle="false" />
|
app:singleLineTitle="false" />-->
|
||||||
|
|
||||||
<ml.docilealligator.infinityforreddit.customviews.preference.CustomFontListPreference
|
<ml.docilealligator.infinityforreddit.customviews.preference.CustomFontListPreference
|
||||||
app:defaultValue="15"
|
app:defaultValue="15"
|
||||||
|
|||||||
Reference in New Issue
Block a user