Fix: #5298 "Add to folder" in podcast contextual side menu (#5344)

This commit is contained in:
vbh 2021-08-17 21:57:49 +00:00 committed by GitHub
parent e05b8e2c45
commit 7ebaa9f619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 19 deletions

View File

@ -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();

View File

@ -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();

View File

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

View File

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