Workaround missing POP3 msgid

This commit is contained in:
M66B 2020-08-31 07:55:54 +02:00
parent 25ebfb11b6
commit c5572caff9
1 changed files with 16 additions and 8 deletions

View File

@ -1922,9 +1922,11 @@ class Core {
}
msgid = uidlMsgId.get(uidl);
if (msgid == null)
if (msgid == null) {
msgid = helper.getMessageID();
else {
if (TextUtils.isEmpty(msgid))
msgid = uidl;
} else {
Log.i(folder.name + " POP having uidl=" + uidl);
continue;
}
@ -1932,18 +1934,24 @@ class Core {
uidl = null;
msgid = helper.getMessageID();
if (TextUtils.isEmpty(msgid)) {
Long time = helper.getReceived();
if (time == null)
time = helper.getSent();
if (time != null)
msgid = Long.toString(time);
}
if (db.message().countMessageByMsgId(folder.id, msgid) > 0) {
Log.i(folder.name + " POP having msgid=" + msgid);
continue;
}
}
if (TextUtils.isEmpty(msgid))
if (uidl == null) {
Log.w(folder.name + " POP no msgid");
continue;
} else
msgid = uidl;
if (TextUtils.isEmpty(msgid)) {
Log.w(folder.name + " POP no msgid");
continue;
}
try {
Log.i(folder.name + " POP sync=" + uidl + "/" + msgid);