Improved compose/attachment error handling

pull/208/head
M66B 2 years ago
parent f7d8de2b57
commit bd9bd89389

@ -4427,7 +4427,7 @@ public class FragmentCompose extends FragmentBase {
// Reset progress on failure // Reset progress on failure
Log.e(ex); Log.e(ex);
db.attachment().setError(attachment.id, Log.formatThrowable(ex, false)); db.attachment().setError(attachment.id, Log.formatThrowable(ex, false));
throw ex; return null;
} }
return attachment; return attachment;
@ -5425,7 +5425,7 @@ public class FragmentCompose extends FragmentBase {
if (last_attachments != null) if (last_attachments != null)
for (EntityAttachment attachment : last_attachments) for (EntityAttachment attachment : last_attachments)
if (!attachment.available && attachment.progress == null) if (!attachment.available && attachment.progress == null && attachment.error == null)
EntityOperation.queue(context, data.draft, EntityOperation.ATTACHMENT, attachment.id); EntityOperation.queue(context, data.draft, EntityOperation.ATTACHMENT, attachment.id);
db.setTransactionSuccessful(); db.setTransactionSuccessful();

Loading…
Cancel
Save