Report new message after classification

pull/190/head
M66B 4 years ago
parent 3b98e55f5d
commit 5824876fe1

@ -2969,7 +2969,6 @@ class Core {
if (download && !message.ui_hide && if (download && !message.ui_hide &&
MessageClassifier.isEnabled(context) && MessageClassifier.canClassify(folder.type)) MessageClassifier.isEnabled(context) && MessageClassifier.canClassify(folder.type))
db.message().setMessageUiHide(message.id, true); db.message().setMessageUiHide(message.id, true);
reportNewMessage(context, account, folder, message);
db.setTransactionSuccessful(); db.setTransactionSuccessful();
} catch (SQLiteConstraintException ex) { } catch (SQLiteConstraintException ex) {
@ -3024,6 +3023,8 @@ class Core {
reportEmptyMessage(context, state, account, istore); reportEmptyMessage(context, state, account, istore);
} }
} }
reportNewMessage(context, account, folder, message);
} else { } else {
if (process) { if (process) {
EntityIdentity identity = matchIdentity(context, folder, message); EntityIdentity identity = matchIdentity(context, folder, message);
@ -3129,10 +3130,8 @@ class Core {
db.message().updateMessage(message); db.message().updateMessage(message);
if (process) { if (process)
runRules(context, imessage, account, folder, message, rules); runRules(context, imessage, account, folder, message, rules);
reportNewMessage(context, account, folder, message);
}
db.setTransactionSuccessful(); db.setTransactionSuccessful();
} finally { } finally {
@ -3144,6 +3143,9 @@ class Core {
MessageClassifier.classify(message, null, context); MessageClassifier.classify(message, null, context);
} else } else
Log.d(folder.name + " unchanged uid=" + uid); Log.d(folder.name + " unchanged uid=" + uid);
if (process)
reportNewMessage(context, account, folder, message);
} }
if (syncSimilar && account.isGmail()) if (syncSimilar && account.isGmail())

Loading…
Cancel
Save