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:
parent
1e4f726dd5
commit
4e4956f0dc
2 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue