summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvbh <56578479+vbh@users.noreply.github.com>2021-08-17 21:57:49 +0000
committerGitHub <noreply@github.com>2021-08-17 23:57:49 +0200
commit7ebaa9f619e004c8f2231bce1d170007c9de1544 (patch)
tree2cfc006687524ae81bb42d8041e121fac6acd684
parente05b8e2c45b0fe06b412ebe597bc5b7313f2241c (diff)
downloadAntennaPod-7ebaa9f619e004c8f2231bce1d170007c9de1544.zip
Fix: #5298 "Add to folder" in podcast contextual side menu (#5344)
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java15
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java8
-rw-r--r--app/src/main/res/menu/nav_feed_context.xml4
-rw-r--r--core/src/main/res/values/strings.xml1
4 files changed, 9 insertions, 19 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java
index 7acb94ab3..826a7e0ab 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java
@@ -31,6 +31,7 @@ import de.danoeh.antennapod.core.dialog.ConfirmationDialog;
import de.danoeh.antennapod.core.event.FeedListUpdateEvent;
import de.danoeh.antennapod.core.event.QueueEvent;
import de.danoeh.antennapod.core.event.UnreadItemsUpdateEvent;
+import de.danoeh.antennapod.dialog.TagSettingsDialog;
import de.danoeh.antennapod.model.feed.Feed;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.storage.DBReader;
@@ -156,18 +157,8 @@ public class NavDrawerFragment extends Fragment implements SharedPreferences.OnS
};
removeAllNewFlagsConfirmationDialog.createNewDialog().show();
return true;
- } else if (itemId == R.id.mark_all_read_item) {
- ConfirmationDialog markAllReadConfirmationDialog = new ConfirmationDialog(getContext(),
- R.string.mark_all_read_label,
- R.string.mark_all_read_confirmation_msg) {
-
- @Override
- public void onConfirmButtonPressed(DialogInterface dialog) {
- dialog.dismiss();
- DBWriter.markFeedRead(feed.getId());
- }
- };
- markAllReadConfirmationDialog.createNewDialog().show();
+ } else if (itemId == R.id.add_to_folder) {
+ TagSettingsDialog.newInstance(feed.getPreferences()).show(getChildFragmentManager(), TagSettingsDialog.TAG);
return true;
} else if (itemId == R.id.rename_item) {
new RenameFeedDialog(getActivity(), feed).show();
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java
index d1d114a50..9fcdc6f02 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java
@@ -40,6 +40,7 @@ import de.danoeh.antennapod.core.event.DownloadEvent;
import de.danoeh.antennapod.core.event.FeedListUpdateEvent;
import de.danoeh.antennapod.core.event.UnreadItemsUpdateEvent;
import de.danoeh.antennapod.core.menuhandler.MenuItemUtils;
+import de.danoeh.antennapod.dialog.TagSettingsDialog;
import de.danoeh.antennapod.model.feed.Feed;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.service.download.DownloadService;
@@ -325,11 +326,8 @@ public class SubscriptionFragment extends Fragment implements Toolbar.OnMenuItem
R.string.remove_all_new_flags_confirmation_msg,
() -> DBWriter.removeFeedNewFlag(feed.getId()));
return true;
- } else if (itemId == R.id.mark_all_read_item) {
- displayConfirmationDialog(
- R.string.mark_all_read_label,
- R.string.mark_all_read_confirmation_msg,
- () -> DBWriter.markFeedRead(feed.getId()));
+ } else if (itemId == R.id.add_to_folder) {
+ TagSettingsDialog.newInstance(feed.getPreferences()).show(getChildFragmentManager(), TagSettingsDialog.TAG);
return true;
} else if (itemId == R.id.rename_item) {
new RenameFeedDialog(getActivity(), feed).show();
diff --git a/app/src/main/res/menu/nav_feed_context.xml b/app/src/main/res/menu/nav_feed_context.xml
index 7fdee5661..4ded52caf 100644
--- a/app/src/main/res/menu/nav_feed_context.xml
+++ b/app/src/main/res/menu/nav_feed_context.xml
@@ -7,9 +7,9 @@
android:title="@string/remove_all_new_flags_label" />
<item
- android:id="@+id/mark_all_read_item"
+ android:id="@+id/add_to_folder"
android:menuCategory="container"
- android:title="@string/mark_all_read_label" />
+ android:title="@string/add_to_folder" />
<item
android:id="@+id/rename_item"
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index 8aabe50b7..20efa320f 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -182,6 +182,7 @@
<string name="open_podcast">Open Podcast</string>
<string name="please_wait_for_data">Please wait until the data is loaded</string>
<string name="updates_disabled_label">Updates disabled</string>
+ <string name="add_to_folder">Add to folder</string>
<!-- actions on feeditems -->
<string name="download_label">Download</string>