From 57fd9edaff2beae6666920d4d17500908d655540 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 15 Mar 2021 00:18:25 +0800 Subject: New options: hide favorite subreddits and subscribed subreddits in the navigation drawer. --- .../adapters/NavigationDrawerRecyclerViewAdapter.java | 9 +++++---- app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/navigation_drawer_preferences.xml | 10 ++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/NavigationDrawerRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/NavigationDrawerRecyclerViewAdapter.java index 9a51e181..1ecd8b25 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/NavigationDrawerRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/NavigationDrawerRecyclerViewAdapter.java @@ -126,7 +126,7 @@ public class NavigationDrawerRecyclerViewAdapter extends RecyclerView.Adapter CURRENT_MENU_ITEMS - (collapseAccountSection ? ACCOUNT_SECTION_ITEMS : 0) - (collapsePostSection ? POST_SECTION_ITEMS : 0) - (collapsePreferencesSection ? PREFERENCES_SECTION_ITEMS : 0)) { - if (!favoriteSubscribedSubreddits.isEmpty() && !collapseFavoriteSubredditsSection && position <= CURRENT_MENU_ITEMS + if (!favoriteSubscribedSubreddits.isEmpty() && !hideFavoriteSubredditsSection && + !collapseFavoriteSubredditsSection && position <= CURRENT_MENU_ITEMS - (collapseAccountSection ? ACCOUNT_SECTION_ITEMS : 0) - (collapsePostSection ? POST_SECTION_ITEMS : 0) - (collapsePreferencesSection ? PREFERENCES_SECTION_ITEMS : 0) @@ -314,7 +315,7 @@ public class NavigationDrawerRecyclerViewAdapter extends RecyclerView.AdapterCollapse Preferences Section Collapse Favorite Subreddits Section Collapse Subscribed Subreddits Section + Hide Favorite Subreddits Section + Hide Subscribed Subreddits Section Cannot get the link diff --git a/app/src/main/res/xml/navigation_drawer_preferences.xml b/app/src/main/res/xml/navigation_drawer_preferences.xml index 4fa0d064..12873fa3 100644 --- a/app/src/main/res/xml/navigation_drawer_preferences.xml +++ b/app/src/main/res/xml/navigation_drawer_preferences.xml @@ -31,4 +31,14 @@ app:key="collapse_subscribed_subreddits_section" app:title="@string/settings_collapse_subscribed_subreddits_section_title" /> + + + + \ No newline at end of file -- cgit v1.2.3