From d5cccff93b0f5c1fcb12e5557966f20fcd6c53ca Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 26 Jun 2020 13:29:52 +0200 Subject: [PATCH] Cancel send error notifications on sync --- app/src/main/java/eu/faircode/email/ServiceSend.java | 5 ++++- 1 file changed, 4 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 f386e92b5b..ff51a6a542 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSend.java +++ b/app/src/main/java/eu/faircode/email/ServiceSend.java @@ -414,13 +414,16 @@ public class ServiceSend extends ServiceBase { db.operation().deleteOperations(outbox.id); // Requeue operations + NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); for (long id : db.message().getMessageByFolder(outbox.id)) { EntityMessage message = db.message().getMessage(id); - if (message != null) + if (message != null) { + nm.cancel("send:" + message.id, 1); if (message.ui_snoozed == null) EntityOperation.queue(this, message, EntityOperation.SEND); else EntityMessage.snooze(this, message.id, message.ui_snoozed); + } } db.setTransactionSuccessful();