mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
Cancel send error notifications on sync
This commit is contained in:
parent
b7bdc6410f
commit
d5cccff93b
1 changed files with 4 additions and 1 deletions
|
@ -414,13 +414,16 @@ public class ServiceSend extends ServiceBase {
|
||||||
db.operation().deleteOperations(outbox.id);
|
db.operation().deleteOperations(outbox.id);
|
||||||
|
|
||||||
// Requeue operations
|
// Requeue operations
|
||||||
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
for (long id : db.message().getMessageByFolder(outbox.id)) {
|
for (long id : db.message().getMessageByFolder(outbox.id)) {
|
||||||
EntityMessage message = db.message().getMessage(id);
|
EntityMessage message = db.message().getMessage(id);
|
||||||
if (message != null)
|
if (message != null) {
|
||||||
|
nm.cancel("send:" + message.id, 1);
|
||||||
if (message.ui_snoozed == null)
|
if (message.ui_snoozed == null)
|
||||||
EntityOperation.queue(this, message, EntityOperation.SEND);
|
EntityOperation.queue(this, message, EntityOperation.SEND);
|
||||||
else
|
else
|
||||||
EntityMessage.snooze(this, message.id, message.ui_snoozed);
|
EntityMessage.snooze(this, message.id, message.ui_snoozed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
|
|
Loading…
Reference in a new issue