Notify remove for POP3 accounts

This commit is contained in:
M66B 2020-09-30 13:58:49 +02:00
parent f9a0c294b6
commit cf7cf6b901
1 changed files with 13 additions and 12 deletions

View File

@ -4835,24 +4835,25 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (message.ui_unsnoozed)
db.message().setMessageUnsnoozed(message.id, false);
if (!account.auto_seen && !message.ui_ignored) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean notify_remove = prefs.getBoolean("notify_remove", true);
if (notify_remove)
db.message().setMessageUiIgnored(message.id, true);
}
if (account.protocol != EntityAccount.TYPE_IMAP) {
if (!message.ui_seen && account.auto_seen)
EntityOperation.queue(context, message, EntityOperation.SEEN, true);
} else {
if (!message.content)
EntityOperation.queue(context, message, EntityOperation.BODY);
if (!folder.read_only)
if (account.auto_seen) {
if (!folder.read_only && account.auto_seen) {
int ops = db.operation().getOperationCount(message.folder, message.id, EntityOperation.SEEN);
if (!message.seen || ops > 0)
EntityOperation.queue(context, message, EntityOperation.SEEN, true);
} else {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean notify_remove = prefs.getBoolean("notify_remove", true);
if (notify_remove && !message.ui_ignored)
db.message().setMessageUiIgnored(message.id, true);
}
if (!message.content)
EntityOperation.queue(context, message, EntityOperation.BODY);
}
db.setTransactionSuccessful();