Fixed wake up

This commit is contained in:
M66B 2019-11-09 19:39:24 +01:00
parent 5ca7af75f4
commit de7843c8cb
1 changed files with 4 additions and 3 deletions

View File

@ -379,17 +379,18 @@ public class ServiceUI extends IntentService {
if (message == null)
return;
db.message().setMessageSnoozed(message.id, null);
EntityFolder folder = db.folder().getFolder(message.folder);
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);
} else {
if (folder.notify) {
// A new message ID is needed for a new (wearable) notification
db.message().deleteMessage(id);
message.id = null;
message.id = db.message().insertMessage(message);
db.message().deleteMessage(id);
db.message().setMessageSnoozed(message.id, null);
EntityOperation.queue(this, message, EntityOperation.SEEN, false, false);
}
}