diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-11-04 15:26:19 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-11-04 15:26:19 +0000 |
commit | f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f (patch) | |
tree | 8ee5a5a1c9e4c3da35b57acff1f20138c0c60e45 /app/src/main/java/ml | |
parent | 44491cbd1bc2975ffa0849ae3c65fb45cdf12efe (diff) | |
download | infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.tar infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.tar.gz infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.tar.bz2 infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.tar.lz infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.tar.xz infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.tar.zst infinity-for-reddit-f1030b721e5919a7b00cdcb7cd5d7dfa5ec9874f.zip |
Continue deleting awards related components.
Diffstat (limited to 'app/src/main/java/ml')
9 files changed, 6 insertions, 64 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountPostsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountPostsActivity.java index d3980735..e66bb9ea 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountPostsActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/AccountPostsActivity.java @@ -100,8 +100,6 @@ public class AccountPostsActivity extends BaseActivity implements SortTypeSelect binding.accountPostsToolbar.setTitle(R.string.downvoted); } else if (mUserWhere.equals(PostPagingSource.USER_WHERE_HIDDEN)) { binding.accountPostsToolbar.setTitle(R.string.hidden); - } else if (mUserWhere.equals(PostPagingSource.USER_WHERE_GILDED)) { - binding.accountPostsToolbar.setTitle(R.string.gilded); } setSupportActionBar(binding.accountPostsToolbar); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java index 870eb985..8c3148ac 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java @@ -521,12 +521,6 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb startActivity(intent); break; } - case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GILDED: { - Intent intent = new Intent(this, AccountPostsActivity.class); - intent.putExtra(AccountPostsActivity.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_GILDED); - startActivity(intent); - break; - } case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: { if (sectionsPagerAdapter != null) { sectionsPagerAdapter.goBackToTop(); @@ -577,8 +571,6 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb return R.drawable.ic_outline_lock_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SAVED: return R.drawable.ic_outline_bookmarks_24dp; - case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GILDED: - return R.drawable.ic_star_border_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: return R.drawable.ic_keyboard_double_arrow_up_24; default: @@ -809,9 +801,6 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb intent.putExtra(AccountPostsActivity.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_HIDDEN); } else if (stringId == R.string.account_saved_thing_activity_label) { intent = new Intent(MainActivity.this, AccountSavedThingActivity.class); - } else if (stringId == R.string.gilded) { - intent = new Intent(MainActivity.this, AccountPostsActivity.class); - intent.putExtra(AccountPostsActivity.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_GILDED); } else if (stringId == R.string.light_theme) { mSharedPreferences.edit().putString(SharedPreferencesUtils.THEME_KEY, "0").apply(); AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO); @@ -1709,10 +1698,8 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb bundle.putString(PostFragment.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_DOWNVOTED); } else if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_HIDDEN) { bundle.putString(PostFragment.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_HIDDEN); - } else if (postType == SharedPreferencesUtils.MAIN_PAGE_TAB_POST_TYPE_SAVED) { - bundle.putString(PostFragment.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_SAVED); } else { - bundle.putString(PostFragment.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_GILDED); + bundle.putString(PostFragment.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_SAVED); } fragment.setArguments(bundle); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java index 3d72c9cc..0b836895 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java @@ -518,12 +518,6 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT startActivity(intent); break; } - case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED: { - Intent intent = new Intent(this, AccountPostsActivity.class); - intent.putExtra(AccountPostsActivity.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_GILDED); - startActivity(intent); - break; - } case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: { if (mFragment instanceof PostFragment) { ((PostFragment) mFragment).goBackToTop(); @@ -575,8 +569,6 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT return R.drawable.ic_outline_lock_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED: return R.drawable.ic_outline_bookmarks_24dp; - case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED: - return R.drawable.ic_star_border_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: return R.drawable.ic_keyboard_double_arrow_up_24; default: diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java index 164817bc..7917a662 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java @@ -702,12 +702,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp startActivity(intent); break; } - case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED: { - Intent intent = new Intent(this, AccountPostsActivity.class); - intent.putExtra(AccountPostsActivity.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_GILDED); - startActivity(intent); - break; - } case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: { if (sectionsPagerAdapter != null) { sectionsPagerAdapter.goBackToTop(); @@ -759,8 +753,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp return R.drawable.ic_outline_lock_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED: return R.drawable.ic_outline_bookmarks_24dp; - case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED: - return R.drawable.ic_star_border_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: return R.drawable.ic_keyboard_double_arrow_up_24; default: diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java index 803e0ddf..febce817 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java @@ -993,12 +993,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele startActivity(intent); break; } - case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED: { - Intent intent = new Intent(this, AccountPostsActivity.class); - intent.putExtra(AccountPostsActivity.EXTRA_USER_WHERE, PostPagingSource.USER_WHERE_GILDED); - startActivity(intent); - break; - } case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: { if (sectionsPagerAdapter != null) { sectionsPagerAdapter.goBackToTop(); @@ -1050,8 +1044,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele return R.drawable.ic_outline_lock_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED: return R.drawable.ic_outline_bookmarks_24dp; - case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED: - return R.drawable.ic_star_border_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: return R.drawable.ic_keyboard_double_arrow_up_24; default: diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostSectionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostSectionRecyclerViewAdapter.java index 2d9f7406..82cd08d1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostSectionRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostSectionRecyclerViewAdapter.java @@ -22,7 +22,7 @@ public class PostSectionRecyclerViewAdapter extends RecyclerView.Adapter<Recycle private static final int VIEW_TYPE_MENU_GROUP_TITLE = 1; private static final int VIEW_TYPE_MENU_ITEM = 2; - private static final int POST_SECTION_ITEMS = 5; + private static final int POST_SECTION_ITEMS = 4; private BaseActivity baseActivity; private int primaryTextColor; @@ -73,10 +73,10 @@ public class PostSectionRecyclerViewAdapter extends RecyclerView.Adapter<Recycle holder.itemView.setOnClickListener(view -> { if (collapsePostSection) { - collapsePostSection = !collapsePostSection; + collapsePostSection = false; notifyItemRangeInserted(holder.getBindingAdapterPosition() + 1, POST_SECTION_ITEMS); } else { - collapsePostSection = !collapsePostSection; + collapsePostSection = true; notifyItemRangeRemoved(holder.getBindingAdapterPosition() + 1, POST_SECTION_ITEMS); } notifyItemChanged(holder.getBindingAdapterPosition()); @@ -103,10 +103,6 @@ public class PostSectionRecyclerViewAdapter extends RecyclerView.Adapter<Recycle stringId = R.string.account_saved_thing_activity_label; drawableId = R.drawable.ic_outline_bookmarks_24dp; break; - case 5: - stringId = R.string.gilded; - drawableId = R.drawable.ic_star_border_24dp; - break; } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java index 86216dcb..3b40d262 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/PostPagingSource.java @@ -40,7 +40,6 @@ public class PostPagingSource extends ListenableFuturePagingSource<String, Post> public static final String USER_WHERE_DOWNVOTED = "downvoted"; public static final String USER_WHERE_HIDDEN = "hidden"; public static final String USER_WHERE_SAVED = "saved"; - public static final String USER_WHERE_GILDED = "gilded"; private Executor executor; private Retrofit retrofit; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CreditsPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CreditsPreferenceFragment.java index f6db3220..b56f2b68 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CreditsPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CreditsPreferenceFragment.java @@ -25,7 +25,6 @@ public class CreditsPreferenceFragment extends CustomFontPreferenceFragmentCompa Preference iconForegroundPreference = findPreference(SharedPreferencesUtils.ICON_FOREGROUND_KEY); Preference iconBackgroundPreference = findPreference(SharedPreferencesUtils.ICON_BACKGROUND_KEY); Preference errorImagePreference = findPreference(SharedPreferencesUtils.ERROR_IMAGE_KEY); - Preference gildedIconPreference = findPreference(SharedPreferencesUtils.GILDED_ICON_KEY); Preference crosspostIconPreference = findPreference(SharedPreferencesUtils.CROSSPOST_ICON_KEY); Preference thumbtackIconPreference = findPreference(SharedPreferencesUtils.THUMBTACK_ICON_KEY); Preference bestRocketIconPreference = findPreference(SharedPreferencesUtils.BEST_ROCKET_ICON_KEY); @@ -62,15 +61,6 @@ public class CreditsPreferenceFragment extends CustomFontPreferenceFragmentCompa }); } - if (gildedIconPreference != null) { - gildedIconPreference.setOnPreferenceClickListener(preference -> { - Intent intent = new Intent(activity, LinkResolverActivity.class); - intent.setData(Uri.parse("https://br.flaticon.com/icone-gratis/medalha_1007239")); - startActivity(intent); - return true; - }); - } - if (crosspostIconPreference != null) { crosspostIconPreference.setOnPreferenceClickListener(preference -> { Intent intent = new Intent(activity, LinkResolverActivity.class); 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 0fe8c0ce..56900dd3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java @@ -12,7 +12,6 @@ public class SharedPreferencesUtils { public static final String ICON_FOREGROUND_KEY = "icon_foreground"; public static final String ICON_BACKGROUND_KEY = "icon_background"; public static final String ERROR_IMAGE_KEY = "error_image"; - public static final String GILDED_ICON_KEY = "gilded_icon"; public static final String CROSSPOST_ICON_KEY = "crosspost_icon"; public static final String THUMBTACK_ICON_KEY = "thumbtack_icon"; public static final String BEST_ROCKET_ICON_KEY = "best_rocket_icon"; @@ -281,8 +280,7 @@ public class SharedPreferencesUtils { public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_DOWNVOTED = 15; public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_HIDDEN = 16; public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SAVED = 17; - public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GILDED = 18; - public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_TOP = 19; + public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_TOP = 18; public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS = 0; public static final int MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_REFRESH = 1; @@ -315,9 +313,7 @@ public class SharedPreferencesUtils { public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_DOWNVOTED = 16; public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDDEN = 17; public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED = 18; - public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GILDED = 19; - public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP = 20; - + public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP = 19; public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS = 0; public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH = 1; public static final int OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE = 2; |