Prevent auto classification out of the spam folder

This commit is contained in:
M66B 2021-01-04 14:08:34 +01:00
parent 3189298bed
commit a810ea96ed
2 changed files with 6 additions and 1 deletions

3
FAQ.md
View File

@ -3432,6 +3432,9 @@ You can clear local messages (long press a folder in the folder list of an accou
Moving a message on the device will reclassify the message.
Moving a message from another email client will not result in reclassification because IMAP does not support 'moved' notifications.
To prevent the email server from moving a message into the spam folder again,
auto classification out of the spam folder will be prevented to prevent an endless loop.
Classification is optimized to use as little resources as possible, but will inevitably use some extra battery power.
You can delete all classification data by turning classification three times off.

View File

@ -111,7 +111,9 @@ public class MessageClassifier {
db.beginTransaction();
EntityFolder target = db.folder().getFolderByName(account.id, classified);
if (target != null && !target.id.equals(folder.id) && target.auto_classify &&
if (target != null && target.auto_classify &&
!target.id.equals(folder.id) &&
!EntityFolder.JUNK.equals(folder.type) &&
(EntityFolder.JUNK.equals(target.type) || ActivityBilling.isPro(context))) {
EntityOperation.queue(context, message, EntityOperation.MOVE, target.id, false, true);