mirror of https://github.com/M66B/FairEmail.git
Notify remove for POP3 accounts
This commit is contained in:
parent
f9a0c294b6
commit
cf7cf6b901
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue