Restore orphan POP3 moves

pull/208/head
M66B 3 years ago
parent 06e84bac7f
commit 4746ede5f0

@ -2961,17 +2961,11 @@ class Core {
msgid + "=" + msgIdTuple.containsKey(msgid) + "/" +
uidl + "=" + uidlTuple.containsKey(uidl));
if (tuple.ui_hide) {
boolean found = false;
List<EntityMessage> threaded = db.message().getMessagesByThread(account.id, tuple.thread, null, null);
for (EntityMessage m : threaded)
if (!m.folder.equals(folder.id) && m.received > 1654034400 /* 2022-06-01 */) {
found = true;
break;
}
if (!found)
// Restore orphan POP3 moves
if (tuple.ui_hide &&
tuple.ui_busy != null &&
tuple.ui_busy < new Date().getTime())
db.message().setMessageUiHide(tuple.id, false);
}
if (download_eml)
try {

@ -638,7 +638,7 @@ public interface DaoMessage {
" AND NOT uid IS NULL")
List<Long> getBusyUids(long folder, long time);
@Query("SELECT id, uidl, msgid, thread, ui_hide FROM message" +
@Query("SELECT id, uidl, msgid, thread, ui_hide, ui_busy FROM message" +
" WHERE folder = :folder")
List<TupleUidl> getUidls(long folder);

@ -25,4 +25,5 @@ public class TupleUidl {
String msgid;
String thread;
boolean ui_hide;
Long ui_busy;
}

Loading…
Cancel
Save