Refactoring

This commit is contained in:
M66B 2023-02-15 09:48:15 +01:00
parent adadc1e911
commit b52386c1a1
2 changed files with 11 additions and 6 deletions

View File

@ -3143,11 +3143,7 @@ class Core {
}
Long sent = helper.getSent();
Long received = helper.getReceivedHeader(helper.getResent());
if (received == null)
received = sent;
if (received == null)
received = 0L;
long received = helper.getPOP3Received();
boolean seen = (received <= account.created);
EntityLog.log(context, account.name + " POP sync=" + uidl + "/" + msgid +

View File

@ -2509,7 +2509,16 @@ public class MessageHelper {
return getReceivedHeader(null);
}
Long getReceivedHeader(Long before) throws MessagingException {
long getPOP3Received() throws MessagingException {
Long received = getReceivedHeader(getResent());
if (received == null)
received = getSent();
if (received == null)
received = 0L;
return received;
}
private Long getReceivedHeader(Long before) throws MessagingException {
ensureHeaders();
// https://tools.ietf.org/html/rfc5321#section-4.4