Ask before opening links, with the option to edit the link

This commit is contained in:
M66B
2018-09-13 13:15:08 +00:00
parent 76f75d5a5f
commit 9a6e56cf16
7 changed files with 62 additions and 22 deletions

View File

@@ -235,8 +235,7 @@ public class FragmentCompose extends FragmentEx {
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
int action = item.getItemId();
if (action == R.id.action_delete) {
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder
new AlertDialog.Builder(getContext())
.setMessage(R.string.title_ask_delete)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
@@ -244,7 +243,8 @@ public class FragmentCompose extends FragmentEx {
onAction(R.id.action_delete);
}
})
.setNegativeButton(android.R.string.cancel, null).show();
.setNegativeButton(android.R.string.cancel, null)
.show();
} else
onAction(action);