Show "mark all as seen" confirmation dialog

This commit is contained in:
Martin Fietz 2016-10-03 13:17:06 +02:00
parent d0ed378e1e
commit 342fea0360
2 changed files with 17 additions and 5 deletions

View File

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

View File

@ -111,6 +111,8 @@
<string name="mark_all_read_confirmation_msg">Please confirm that you want to mark all episodes as being played.</string>
<string name="mark_all_read_feed_confirmation_msg">Please confirm that you want to mark all episodes in this feed as being played.</string>
<string name="mark_all_seen_label">Mark all as seen</string>
<string name="mark_all_seen_msg">Marked all Episodes as seen</string>
<string name="mark_all_seen_confirmation_msg">Please confirm that you want to mark all episodes as seen.</string>
<string name="show_info_label">Show information</string>
<string name="remove_feed_label">Remove Podcast</string>
<string name="share_label">Share&#8230;</string>