diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-11-06 04:59:16 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-11-06 04:59:16 +0000 |
commit | 5f1a23a2a453258d733b080a3e8f5946b7333157 (patch) | |
tree | a1b0b7ca7f3dbaee2595184d0a1240638f1d232c /app/src | |
parent | 71c055ba64de20f00b09339544f456377edc5f2f (diff) | |
download | infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.tar infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.tar.gz infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.tar.bz2 infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.tar.lz infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.tar.xz infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.tar.zst infinity-for-reddit-5f1a23a2a453258d733b080a3e8f5946b7333157.zip |
Remove min and max awards in CustomizePostFilterActivity.
Diffstat (limited to 'app/src')
5 files changed, 5 insertions, 78 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java index 59639054..0cb3e54b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java @@ -188,14 +188,6 @@ public class CustomizePostFilterActivity extends BaseActivity { TextInputLayout maxCommentsTextInputLayout; @BindView(R.id.max_comments_text_input_edit_text_customize_post_filter_activity) TextInputEditText maxCommentsTextInputEditText; - @BindView(R.id.min_awards_text_input_layout_customize_post_filter_activity) - TextInputLayout minAwardsTextInputLayout; - @BindView(R.id.min_awards_text_input_edit_text_customize_post_filter_activity) - TextInputEditText minAwardsTextInputEditText; - @BindView(R.id.max_awards_text_input_layout_customize_post_filter_activity) - TextInputLayout maxAwardsTextInputLayout; - @BindView(R.id.max_awards_text_input_edit_text_customize_post_filter_activity) - TextInputEditText maxAwardsTextInputEditText; @Inject RedditDataRoomDatabase mRedditDataRoomDatabase; @Inject @@ -330,8 +322,6 @@ public class CustomizePostFilterActivity extends BaseActivity { maxVoteTextInputEditText.setText(Integer.toString(postFilter.maxVote)); minCommentsTextInputEditText.setText(Integer.toString(postFilter.minComments)); maxCommentsTextInputEditText.setText(Integer.toString(postFilter.maxComments)); - minAwardsTextInputEditText.setText(Integer.toString(postFilter.minAwards)); - maxAwardsTextInputEditText.setText(Integer.toString(postFilter.maxAwards)); Intent intent = getIntent(); String excludeSubreddit = intent.getStringExtra(EXTRA_EXCLUDE_SUBREDDIT); @@ -451,12 +441,6 @@ public class CustomizePostFilterActivity extends BaseActivity { maxCommentsTextInputLayout.setBoxStrokeColor(primaryTextColor); maxCommentsTextInputLayout.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor)); maxCommentsTextInputEditText.setTextColor(primaryTextColor); - minAwardsTextInputLayout.setBoxStrokeColor(primaryTextColor); - minAwardsTextInputLayout.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor)); - minAwardsTextInputEditText.setTextColor(primaryTextColor); - maxAwardsTextInputLayout.setBoxStrokeColor(primaryTextColor); - maxAwardsTextInputLayout.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor)); - maxAwardsTextInputEditText.setTextColor(primaryTextColor); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { nameTextInputEditText.setTextCursorDrawable(cursorDrawable); @@ -474,8 +458,6 @@ public class CustomizePostFilterActivity extends BaseActivity { maxVoteTextInputEditText.setTextCursorDrawable(cursorDrawable); minCommentsTextInputEditText.setTextCursorDrawable(cursorDrawable); maxCommentsTextInputEditText.setTextCursorDrawable(cursorDrawable); - minAwardsTextInputEditText.setTextCursorDrawable(cursorDrawable); - maxAwardsTextInputEditText.setTextCursorDrawable(cursorDrawable); } else { setCursorDrawableColor(nameTextInputEditText, primaryTextColor); setCursorDrawableColor(titleExcludesStringsTextInputEditText, primaryTextColor); @@ -492,8 +474,6 @@ public class CustomizePostFilterActivity extends BaseActivity { setCursorDrawableColor(maxVoteTextInputEditText, primaryTextColor); setCursorDrawableColor(minCommentsTextInputEditText, primaryTextColor); setCursorDrawableColor(maxCommentsTextInputEditText, primaryTextColor); - setCursorDrawableColor(minAwardsTextInputEditText, primaryTextColor); - setCursorDrawableColor(maxAwardsTextInputEditText, primaryTextColor); } if (typeface != null) { @@ -636,8 +616,8 @@ public class CustomizePostFilterActivity extends BaseActivity { postFilter.minVote = minVoteTextInputEditText.getText() == null || minVoteTextInputEditText.getText().toString().equals("") ? -1 : Integer.parseInt(minVoteTextInputEditText.getText().toString()); postFilter.maxComments = maxCommentsTextInputEditText.getText() == null || maxCommentsTextInputEditText.getText().toString().equals("") ? -1 : Integer.parseInt(maxCommentsTextInputEditText.getText().toString()); postFilter.minComments = minCommentsTextInputEditText.getText() == null || minCommentsTextInputEditText.getText().toString().equals("") ? -1 : Integer.parseInt(minCommentsTextInputEditText.getText().toString()); - postFilter.maxAwards = maxAwardsTextInputEditText.getText() == null || maxAwardsTextInputEditText.getText().toString().equals("") ? -1 : Integer.parseInt(maxAwardsTextInputEditText.getText().toString()); - postFilter.minAwards = minAwardsTextInputEditText.getText() == null || minAwardsTextInputEditText.getText().toString().equals("") ? -1 : Integer.parseInt(minAwardsTextInputEditText.getText().toString()); + postFilter.maxAwards = -1; + postFilter.minAwards = -1; postFilter.postTitleExcludesRegex = titleExcludesRegexTextInputEditText.getText().toString(); Pattern.compile(postFilter.postTitleExcludesRegex); postFilter.postTitleContainsRegex = titleContainsRegexTextInputEditText.getText().toString(); 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 395bdd4d..298214d3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -148,7 +148,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi private int mButtonTextColor; private int mCommentIconAndInfoColor; private int mFullyCollapsedCommentBackgroundColor; - private int mAwardedCommentBackgroundColor; private int[] verticalBlockColors; private int mSearchCommentIndex = -1; @@ -260,7 +259,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi mButtonTextColor = customThemeWrapper.getButtonTextColor(); mCommentIconAndInfoColor = customThemeWrapper.getCommentIconAndInfoColor(); mFullyCollapsedCommentBackgroundColor = customThemeWrapper.getFullyCollapsedCommentBackgroundColor(); - mAwardedCommentBackgroundColor = customThemeWrapper.getAwardedCommentBackgroundColor(); verticalBlockColors = new int[] { customThemeWrapper.getCommentVerticalBarColor1(), @@ -366,8 +364,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi if (comment != null) { if (mIsSingleCommentThreadMode && comment.getId().equals(mSingleCommentId)) { holder.itemView.setBackgroundColor(mSingleCommentThreadBackgroundColor); - } else if (comment.getAwards() != null && !comment.getAwards().equals("")) { - holder.itemView.setBackgroundColor(mAwardedCommentBackgroundColor); } String authorPrefixed = "u/" + comment.getAuthor(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java index f7093b7b..938cd9d9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java @@ -447,11 +447,6 @@ public class CustomThemeWrapper { getDefaultColor("#8EDFBA", "#21C561", "#21C561")); } - public int getAwardedCommentBackgroundColor() { - return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.AWARDED_COMMENT_BACKGROUND_COLOR, - getDefaultColor("#FFFFFF", "#242424", "#000000")); - } - public int getNavBarColor() { return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.NAV_BAR_COLOR, getDefaultColor("#FFFFFF", "#121212", "#000000")); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java index c5daf67c..c74afed3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java @@ -59,8 +59,8 @@ public class CustomThemeSharedPreferencesUtils { public static final String NSFW_TEXT_COLOR = "nsfwTextColor"; public static final String FLAIR_BACKGROUND_COLOR = "flairBackgroundColor"; public static final String FLAIR_TEXT_COLOR = "flairTextColor"; - public static final String AWARDS_BACKGROUND_COLOR = "awardsBackgroundColor"; - public static final String AWARDS_TEXT_COLOR = "awardsTextColor"; + private static final String AWARDS_BACKGROUND_COLOR = "awardsBackgroundColor"; + private static final String AWARDS_TEXT_COLOR = "awardsTextColor"; public static final String ARCHIVED_ICON_TINT = "archivedIconTint"; public static final String LOCKED_ICON_TINT = "lockedIconTint"; public static final String CROSSPOST_ICON_TINT = "crosspostIconTint"; @@ -96,7 +96,7 @@ public class CustomThemeSharedPreferencesUtils { public static final String SENT_MESSAGE_BACKGROUND_COLOR = "sentMessageBackgroundColor"; public static final String SEND_MESSAGE_ICON_COLOR = "sentMessageIconColor"; public static final String FULLY_COLLAPSED_COMMENT_BACKGROUND_COLOR = "fullyCollapsedCommentBackgroundColor"; - public static final String AWARDED_COMMENT_BACKGROUND_COLOR = "awardedCommentBackgroundColor"; + private static final String AWARDED_COMMENT_BACKGROUND_COLOR = "awardedCommentBackgroundColor"; public static void insertThemeToSharedPreferences(CustomTheme customTheme, SharedPreferences themeSharedPreferences) { SharedPreferences.Editor editor = themeSharedPreferences.edit(); diff --git a/app/src/main/res/layout/activity_customize_post_filter.xml b/app/src/main/res/layout/activity_customize_post_filter.xml index 427e24e5..5a78b003 100644 --- a/app/src/main/res/layout/activity_customize_post_filter.xml +++ b/app/src/main/res/layout/activity_customize_post_filter.xml @@ -635,50 +635,6 @@ </com.google.android.material.textfield.TextInputLayout> - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/min_awards_text_input_layout_customize_post_filter_activity" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="8dp" - android:paddingBottom="8dp" - android:paddingStart="16dp" - android:paddingEnd="16dp" - style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> - - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/min_awards_text_input_edit_text_customize_post_filter_activity" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="numberSigned" - android:fontFamily="?attr/font_family" - android:textSize="?attr/font_default" - android:hint="@string/min_awards_hint" - android:maxLines="1" /> - - </com.google.android.material.textfield.TextInputLayout> - - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/max_awards_text_input_layout_customize_post_filter_activity" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="8dp" - android:paddingBottom="8dp" - android:paddingStart="16dp" - android:paddingEnd="16dp" - style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> - - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/max_awards_text_input_edit_text_customize_post_filter_activity" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="numberSigned" - android:fontFamily="?attr/font_family" - android:textSize="?attr/font_default" - android:hint="@string/max_awards_hint" - android:maxLines="1" /> - - </com.google.android.material.textfield.TextInputLayout> - </LinearLayout> </androidx.core.widget.NestedScrollView> |