Cancel send error notifications on sync

This commit is contained in:
M66B 2020-06-26 13:29:52 +02:00
parent b7bdc6410f
commit d5cccff93b
1 changed files with 4 additions and 1 deletions

View File

@ -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();