pull/212/head
M66B 2 years ago
parent d6f28bb5b4
commit 4fddb571f1

@ -98,6 +98,8 @@ public class EntityContact implements Serializable {
@NonNull @NonNull
public Integer state = STATE_DEFAULT; public Integer state = STATE_DEFAULT;
private static int MAX_AGE = EntityFolder.DEFAULT_KEEP;
static void received( static void received(
@NonNull Context context, @NonNull Context context,
@NonNull EntityAccount account, @NonNull EntityAccount account,
@ -105,8 +107,8 @@ public class EntityContact implements Serializable {
@NonNull EntityMessage message) { @NonNull EntityMessage message) {
if (account.protocol == EntityAccount.TYPE_IMAP) { if (account.protocol == EntityAccount.TYPE_IMAP) {
int days = (folder.isOutgoing() ? folder.keep_days : folder.sync_days); int days = (folder.isOutgoing() ? folder.keep_days : folder.sync_days);
if (days == Integer.MAX_VALUE) if (days > MAX_AGE)
days = EntityFolder.DEFAULT_KEEP; days = MAX_AGE;
if (message.received < account.created - days * 24 * 3600 * 1000L) if (message.received < account.created - days * 24 * 3600 * 1000L)
return; return;
} }

Loading…
Cancel
Save