|
|
|
@ -2964,6 +2964,7 @@ class Core {
|
|
|
|
|
try {
|
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
message.notifying = EntityMessage.NOTIFYING_IGNORE;
|
|
|
|
|
message.id = db.message().insertMessage(message);
|
|
|
|
|
Log.i(folder.name + " added id=" + message.id + " uid=" + message.uid);
|
|
|
|
|
|
|
|
|
@ -2979,7 +2980,7 @@ class Core {
|
|
|
|
|
runRules(context, imessage, account, folder, message, rules);
|
|
|
|
|
if (download && !message.ui_hide &&
|
|
|
|
|
MessageClassifier.isEnabled(context) && folder.auto_classify_source)
|
|
|
|
|
db.message().setMessageUiHide(message.id, true);
|
|
|
|
|
db.message().setMessageUiHide(message.id, true); // keep local value
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
|
} catch (SQLiteConstraintException ex) {
|
|
|
|
@ -2996,6 +2997,7 @@ class Core {
|
|
|
|
|
db.endTransaction();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (message.received > account.created)
|
|
|
|
|
updateContactInfo(context, folder, message);
|
|
|
|
|
|
|
|
|
@ -3039,6 +3041,9 @@ class Core {
|
|
|
|
|
db.message().setMessageUiHide(message.id, false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
db.message().setMessageNotifying(message.id, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reportNewMessage(context, account, folder, message);
|
|
|
|
|
} else {
|
|
|
|
@ -3559,6 +3564,11 @@ class Core {
|
|
|
|
|
|
|
|
|
|
// Current
|
|
|
|
|
for (TupleMessageEx message : messages) {
|
|
|
|
|
if (message.notifying == EntityMessage.NOTIFYING_IGNORE) {
|
|
|
|
|
Log.e("Notify ignore");
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check if notification channel enabled
|
|
|
|
|
if (message.notifying == 0 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && pro) {
|
|
|
|
|
String channelId = message.getNotificationChannelId();
|
|
|
|
|