From 342fea036096663858f533a307a71f9eee767887 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Mon, 3 Oct 2016 13:17:06 +0200 Subject: [PATCH] Show "mark all as seen" confirmation dialog --- .../fragment/AllEpisodesFragment.java | 20 ++++++++++++++----- core/src/main/res/values/strings.xml | 2 ++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java index 29df6617d..ab8808093 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java @@ -227,22 +227,32 @@ public class AllEpisodesFragment extends Fragment { } return true; case R.id.mark_all_read_item: - ConfirmationDialog conDialog = new ConfirmationDialog(getActivity(), + ConfirmationDialog markAllReadConfirmationDialog = new ConfirmationDialog(getActivity(), R.string.mark_all_read_label, R.string.mark_all_read_confirmation_msg) { @Override - public void onConfirmButtonPressed( - DialogInterface dialog) { + public void onConfirmButtonPressed(DialogInterface dialog) { dialog.dismiss(); DBWriter.markAllItemsRead(); Toast.makeText(getActivity(), R.string.mark_all_read_msg, Toast.LENGTH_SHORT).show(); } }; - conDialog.createNewDialog().show(); + markAllReadConfirmationDialog.createNewDialog().show(); return true; case R.id.mark_all_seen_item: - DBWriter.markNewItemsSeen(); + ConfirmationDialog markAllSeenConfirmationDialog = new ConfirmationDialog(getActivity(), + R.string.mark_all_seen_label, + R.string.mark_all_seen_confirmation_msg) { + + @Override + public void onConfirmButtonPressed(DialogInterface dialog) { + dialog.dismiss(); + DBWriter.markNewItemsSeen(); + Toast.makeText(getActivity(), R.string.mark_all_seen_msg, Toast.LENGTH_SHORT).show(); + } + }; + markAllSeenConfirmationDialog.createNewDialog().show(); return true; default: return false; diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 29fa7797f..ef79d4d0b 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -111,6 +111,8 @@ Please confirm that you want to mark all episodes as being played. Please confirm that you want to mark all episodes in this feed as being played. Mark all as seen + Marked all Episodes as seen + Please confirm that you want to mark all episodes as seen. Show information Remove Podcast Share…