1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Prevent multiple sends

This commit is contained in:
M66B 2020-04-09 21:36:33 +02:00
parent 1e4f726dd5
commit 4e4956f0dc
2 changed files with 5 additions and 3 deletions

View file

@ -358,7 +358,7 @@ public class ServiceSend extends ServiceBase {
int ops = db.operation().getOperationCount(outbox.id, id, EntityOperation.SEND);
if (ops == 0) {
EntityMessage message = db.message().getMessage(id);
if (message != null)
if (message != null && message.ui_snoozed == null)
EntityOperation.queue(this, message, EntityOperation.SEND);
}
}

View file

@ -458,8 +458,10 @@ public class ServiceUI extends IntentService {
if (EntityFolder.OUTBOX.equals(folder.type)) {
Log.i("Delayed send id=" + message.id);
db.message().setMessageSnoozed(message.id, null);
EntityOperation.queue(this, message, EntityOperation.SEND);
if (message.ui_snoozed != null) {
db.message().setMessageSnoozed(message.id, null);
EntityOperation.queue(this, message, EntityOperation.SEND);
}
} else {
if (folder.notify) {
// A new message ID is needed for a new (wearable) notification