From 0fab87270242f7af7cb1d8814f6ad0dbb1ffcb75 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 4 Jun 2024 11:25:52 +0200 Subject: [PATCH] Cancel download: composer --- .../email/FragmentDialogDownloadAttachments.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogDownloadAttachments.java b/app/src/main/java/eu/faircode/email/FragmentDialogDownloadAttachments.java index 258dff2b3a..51e167cc35 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogDownloadAttachments.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogDownloadAttachments.java @@ -184,15 +184,17 @@ public class FragmentDialogDownloadAttachments extends FragmentDialogBase { pbDownloaded.setVisibility(remaining.isEmpty() ? View.VISIBLE : View.GONE); tvRemaining.setVisibility(remaining.isEmpty() ? View.VISIBLE : View.GONE); + final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + startActivity(intent); + } + }; + return new AlertDialog.Builder(context) .setView(dview) - .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - startActivity(intent); - } - }) - .setNegativeButton(android.R.string.cancel, null) + .setPositiveButton(android.R.string.ok, listener) + .setNegativeButton(R.string.title_dismiss, listener) .create(); }