|
|
@ -94,7 +94,8 @@ public class MessageClassifier {
|
|
|
|
" message=" + message.id +
|
|
|
|
" message=" + message.id +
|
|
|
|
"@" + new Date(message.received) +
|
|
|
|
"@" + new Date(message.received) +
|
|
|
|
":" + message.subject +
|
|
|
|
":" + message.subject +
|
|
|
|
" class=" + classified);
|
|
|
|
" class=" + classified +
|
|
|
|
|
|
|
|
" re=" + message.auto_classified);
|
|
|
|
|
|
|
|
|
|
|
|
Integer m = classMessages.get(account.id).get(folder.name);
|
|
|
|
Integer m = classMessages.get(account.id).get(folder.name);
|
|
|
|
if (target == null) {
|
|
|
|
if (target == null) {
|
|
|
@ -108,21 +109,23 @@ public class MessageClassifier {
|
|
|
|
|
|
|
|
|
|
|
|
dirty = true;
|
|
|
|
dirty = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (classified != null) {
|
|
|
|
if (classified != null && !message.auto_classified)
|
|
|
|
EntityFolder f = db.folder().getFolderByName(account.id, classified);
|
|
|
|
|
|
|
|
if (f != null && !f.id.equals(folder.id) && f.auto_classify &&
|
|
|
|
|
|
|
|
(EntityFolder.JUNK.equals(f.type) || ActivityBilling.isPro(context)))
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
db.beginTransaction();
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EntityFolder f = db.folder().getFolderByName(account.id, classified);
|
|
|
|
|
|
|
|
if (f != null && !f.id.equals(folder.id) && f.auto_classify &&
|
|
|
|
|
|
|
|
(EntityFolder.JUNK.equals(f.type) || ActivityBilling.isPro(context))) {
|
|
|
|
|
|
|
|
|
|
|
|
EntityOperation.queue(context, message, EntityOperation.MOVE, f.id, false, true);
|
|
|
|
EntityOperation.queue(context, message, EntityOperation.MOVE, f.id, false, true);
|
|
|
|
message.ui_hide = true;
|
|
|
|
message.ui_hide = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
db.endTransaction();
|
|
|
|
db.endTransaction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.e(ex);
|
|
|
|
Log.e(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|