From 4abadb78c4f56b2b8d61bd7130073ca2bb712545 Mon Sep 17 00:00:00 2001
From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>
Date: Thu, 3 Nov 2022 22:13:08 +1100
Subject: New option in PostFragment: More options.
---
.../docilealligator/infinityforreddit/fragments/PostFragment.java | 8 ++++++++
app/src/main/res/menu/post_fragment.xml | 6 ++++++
app/src/main/res/values/strings.xml | 1 +
3 files changed, 15 insertions(+)
(limited to 'app/src')
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 2cd04385..7eb5756a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
@@ -81,6 +81,7 @@ import ml.docilealligator.infinityforreddit.adapters.Paging3LoadingStateAdapter;
import ml.docilealligator.infinityforreddit.adapters.PostRecyclerViewAdapter;
import ml.docilealligator.infinityforreddit.asynctasks.LoadSubredditIcon;
import ml.docilealligator.infinityforreddit.asynctasks.LoadUserData;
+import ml.docilealligator.infinityforreddit.bottomsheetfragments.FABMoreOptionsBottomSheetFragment;
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
import ml.docilealligator.infinityforreddit.customviews.CustomToroContainer;
import ml.docilealligator.infinityforreddit.customviews.LinearLayoutManagerBugFixed;
@@ -1316,6 +1317,13 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
} else if (item.getItemId() == R.id.action_filter_posts_post_fragment) {
filterPosts();
return true;
+ } else if (item.getItemId() == R.id.action_more_options_post_fragment) {
+ FABMoreOptionsBottomSheetFragment fabMoreOptionsBottomSheetFragment= new FABMoreOptionsBottomSheetFragment();
+ Bundle bundle = new Bundle();
+ bundle.putBoolean(FABMoreOptionsBottomSheetFragment.EXTRA_ANONYMOUS_MODE, accessToken == null);
+ fabMoreOptionsBottomSheetFragment.setArguments(bundle);
+ fabMoreOptionsBottomSheetFragment.show(activity.getSupportFragmentManager(), fabMoreOptionsBottomSheetFragment.getTag());
+ return true;
}
return false;
}
diff --git a/app/src/main/res/menu/post_fragment.xml b/app/src/main/res/menu/post_fragment.xml
index fc648460..2616a6cd 100644
--- a/app/src/main/res/menu/post_fragment.xml
+++ b/app/src/main/res/menu/post_fragment.xml
@@ -11,4 +11,10 @@
android:orderInCategory="101"
android:title="@string/filter_posts"
app:showAsAction="never" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 97f22c9f..251b53c2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -96,6 +96,7 @@
Go to Wiki
Playback Speed
Contact Mods
+ More Options
Error occurred when parsing the JSON response
Error Retrieving the token
--
cgit v1.2.3