From fbf4201418070ba997f76e3c86cac6dc46cce6a1 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 4 Dec 2022 10:28:03 +1100 Subject: Hide more options menu item in some activities. --- .../docilealligator/infinityforreddit/fragments/PostFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index 763ef3cb..35b470b8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -75,6 +75,8 @@ import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RecyclerViewContentScrollingInterface; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SortType; +import ml.docilealligator.infinityforreddit.activities.AccountPostsActivity; +import ml.docilealligator.infinityforreddit.activities.AccountSavedThingActivity; import ml.docilealligator.infinityforreddit.activities.BaseActivity; import ml.docilealligator.infinityforreddit.activities.FilteredPostsActivity; import ml.docilealligator.infinityforreddit.activities.ViewSubredditDetailActivity; @@ -1317,6 +1319,11 @@ public class PostFragment extends Fragment implements FragmentCommunicator { if (activity instanceof FilteredPostsActivity) { menu.findItem(R.id.action_filter_posts_post_fragment).setVisible(false); } + + if (activity instanceof FilteredPostsActivity || activity instanceof AccountPostsActivity + || activity instanceof AccountSavedThingActivity) { + menu.findItem(R.id.action_more_options_post_fragment).setVisible(false); + } } @Override -- cgit v1.2.3