From 986acc5fc5962e67fd85f4034c4118932da136f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Thu, 26 Dec 2019 16:15:30 +0100 Subject: [PATCH] Reorder buttons in clear downloads dialog --- .../us/shandian/giga/ui/fragment/MissionsFragment.java | 9 +++++---- app/src/main/res/menu/download_menu.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index 98231cffe..be0b0bb25 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -190,11 +190,12 @@ public class MissionsFragment extends Fragment { return true; case R.id.clear_list: AlertDialog.Builder prompt = new AlertDialog.Builder(mContext); - prompt.setTitle(R.string.clear_finished_download); + prompt.setTitle(R.string.clear_download_history); prompt.setMessage(R.string.confirm_prompt); - prompt.setPositiveButton(R.string.clear_finished_download, (dialog, which) -> mAdapter.clearFinishedDownloads(false)); - prompt.setNeutralButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true)); - prompt.setNegativeButton(R.string.cancel, null); + // Intentionally misusing button's purpose in order to achieve good order + prompt.setNegativeButton(R.string.clear_download_history, (dialog, which) -> mAdapter.clearFinishedDownloads(false)); + prompt.setPositiveButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true)); + prompt.setNeutralButton(R.string.cancel, null); prompt.create().show(); return true; case R.id.start_downloads: diff --git a/app/src/main/res/menu/download_menu.xml b/app/src/main/res/menu/download_menu.xml index f91f8ad7b..8728e146e 100644 --- a/app/src/main/res/menu/download_menu.xml +++ b/app/src/main/res/menu/download_menu.xml @@ -24,7 +24,7 @@ Progress lost, because the file was deleted Connection timeout Cannot recover this download - Clear finished downloads + Clear download history Do you want to clear your download history or delete all downloaded files? Stop Maximum retries