From 20a243c2e5a586f95188bd07d806d0f7dbeb4cab Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 17 Jun 2021 07:59:48 +0200 Subject: [PATCH] Handle send cancelled --- app/src/main/java/eu/faircode/email/ServiceSend.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSend.java b/app/src/main/java/eu/faircode/email/ServiceSend.java index 32e6b0a734..edcabb9878 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSend.java +++ b/app/src/main/java/eu/faircode/email/ServiceSend.java @@ -487,9 +487,10 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar private void onSend(EntityMessage message) throws MessagingException, IOException { DB db = DB.getInstance(this); + // Check if cancelled by user or by errors EntityOperation operation = db.operation().getOperation(message.id, EntityOperation.SEND); if (operation == null) - throw new IllegalArgumentException("Send cancelled"); + return; // Mark attempt if (message.last_attempt == null) {