Clean up AlertDialogs
This commit is contained in:
parent
e33bb676f9
commit
c1f0a945c0
15 changed files with 89 additions and 112 deletions
|
|
@ -538,7 +538,6 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
|
|||
|
||||
builder.setNegativeButton(R.string.ok, (dialog, which) -> dialog.cancel())
|
||||
.setTitle(mission.storage.getName())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,12 +211,11 @@ public class MissionsFragment extends Fragment {
|
|||
.setTitle(R.string.clear_download_history)
|
||||
.setMessage(R.string.confirm_prompt)
|
||||
// Intentionally misusing buttons' purpose in order to achieve good order
|
||||
.setNegativeButton(R.string.clear_download_history,
|
||||
(dialog, which) -> mAdapter.clearFinishedDownloads(false))
|
||||
.setNegativeButton(R.string.clear_download_history, (dialog, which) ->
|
||||
mAdapter.clearFinishedDownloads(false))
|
||||
.setNeutralButton(R.string.cancel, null)
|
||||
.setPositiveButton(R.string.delete_downloaded_files,
|
||||
(dialog, which) -> showDeleteDownloadedFilesConfirmationPrompt())
|
||||
.create()
|
||||
.setPositiveButton(R.string.delete_downloaded_files, (dialog, which) ->
|
||||
showDeleteDownloadedFilesConfirmationPrompt())
|
||||
.show();
|
||||
}
|
||||
|
||||
|
|
@ -225,9 +224,8 @@ public class MissionsFragment extends Fragment {
|
|||
new AlertDialog.Builder(mContext)
|
||||
.setTitle(R.string.delete_downloaded_files_confirm)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setPositiveButton(R.string.ok,
|
||||
(dialog, which) -> mAdapter.clearFinishedDownloads(true))
|
||||
.create()
|
||||
.setPositiveButton(R.string.ok, (dialog, which) ->
|
||||
mAdapter.clearFinishedDownloads(true))
|
||||
.show();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue