mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-01 10:35:15 +01:00
Removed disacrd draft on exit
This commit is contained in:
@@ -1293,28 +1293,11 @@ public class FragmentCompose extends FragmentBase {
|
||||
finish();
|
||||
else if (isEmpty())
|
||||
onAction(R.id.action_delete);
|
||||
else
|
||||
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
||||
.setMessage(R.string.title_ask_discard)
|
||||
.setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
onAction(R.id.action_delete);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.title_no, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
})
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
else {
|
||||
autosave = false;
|
||||
onAction(R.id.action_save);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isEmpty() {
|
||||
|
||||
Reference in New Issue
Block a user