|
|
|
@ -880,18 +880,6 @@ public class FragmentCompose extends FragmentEx {
|
|
|
|
|
if (draft == null)
|
|
|
|
|
throw new MessageRemovedException("Draft for action was deleted");
|
|
|
|
|
|
|
|
|
|
// Check data
|
|
|
|
|
if (action == R.id.action_send) {
|
|
|
|
|
if (draft.identity == null)
|
|
|
|
|
throw new IllegalArgumentException(context.getString(R.string.title_from_missing));
|
|
|
|
|
|
|
|
|
|
if (draft.to == null && draft.cc == null && draft.bcc == null)
|
|
|
|
|
throw new IllegalArgumentException(context.getString(R.string.title_to_missing));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
Log.i(Helper.TAG, "Load action id=" + draft.id + " action=" + action);
|
|
|
|
|
|
|
|
|
|
// Convert data
|
|
|
|
@ -911,6 +899,18 @@ public class FragmentCompose extends FragmentEx {
|
|
|
|
|
|
|
|
|
|
body = "<pre>" + body.replaceAll("\\r?\\n", "<br />") + "</pre>";
|
|
|
|
|
|
|
|
|
|
// Check data
|
|
|
|
|
if (action == R.id.action_send) {
|
|
|
|
|
if (draft.identity == null)
|
|
|
|
|
throw new IllegalArgumentException(context.getString(R.string.title_from_missing));
|
|
|
|
|
|
|
|
|
|
if (draft.to == null && draft.cc == null && draft.bcc == null)
|
|
|
|
|
throw new IllegalArgumentException(context.getString(R.string.title_to_missing));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
// Execute action
|
|
|
|
|
if (action == R.id.action_trash) {
|
|
|
|
|
draft.ui_seen = true;
|
|
|
|
|