mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Small fix
This commit is contained in:
parent
d6f28bb5b4
commit
4fddb571f1
1 changed files with 4 additions and 2 deletions
|
@ -98,6 +98,8 @@ public class EntityContact implements Serializable {
|
|||
@NonNull
|
||||
public Integer state = STATE_DEFAULT;
|
||||
|
||||
private static int MAX_AGE = EntityFolder.DEFAULT_KEEP;
|
||||
|
||||
static void received(
|
||||
@NonNull Context context,
|
||||
@NonNull EntityAccount account,
|
||||
|
@ -105,8 +107,8 @@ public class EntityContact implements Serializable {
|
|||
@NonNull EntityMessage message) {
|
||||
if (account.protocol == EntityAccount.TYPE_IMAP) {
|
||||
int days = (folder.isOutgoing() ? folder.keep_days : folder.sync_days);
|
||||
if (days == Integer.MAX_VALUE)
|
||||
days = EntityFolder.DEFAULT_KEEP;
|
||||
if (days > MAX_AGE)
|
||||
days = MAX_AGE;
|
||||
if (message.received < account.created - days * 24 * 3600 * 1000L)
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue