Hide more options menu item in some activities.

This commit is contained in:
Docile-Alligator 2022-12-04 10:28:03 +11:00
parent ecbddaafcb
commit fbf4201418

View File

@ -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