POP3: keep starred messages

This commit is contained in:
M66B 2023-09-04 19:26:17 +02:00
parent 067b5e7f5f
commit d57348b251
1 changed files with 2 additions and 1 deletions

View File

@ -160,6 +160,7 @@ class Core {
private static final long EXISTS_RETRY_DELAY = 20 * 1000L; // milliseconds
private static final int FIND_RETRY_COUNT = 3; // times
private static final long FIND_RETRY_DELAY = 5 * 1000L; // milliseconds
private static final int POP3_KEEP_EXTRA = 100; // messages
private static final long POP3_KEEP_DELETED = 3 * 24 * 3600 * 1000L; // milliseconds
private static final Map<Long, List<EntityIdentity>> accountIdentities = new HashMap<>();
@ -3647,7 +3648,7 @@ class Core {
if (account.max_messages != null && !account.leave_on_device) {
int hidden = db.message().setMessagesUiHide(folder.id, Math.abs(account.max_messages));
int deleted = db.message().deleteMessagesKeep(folder.id,
Math.abs(account.max_messages) + 100, new Date().getTime() - POP3_KEEP_DELETED);
Math.abs(account.max_messages) + flagged + POP3_KEEP_EXTRA, new Date().getTime() - POP3_KEEP_DELETED);
EntityLog.log(context, account.name + " POP" +
" cleanup max=" + account.max_messages +
" hidden=" + hidden +