Restore orphan POP3 moves

This commit is contained in:
M66B 2022-06-06 19:39:39 +02:00
parent 06e84bac7f
commit 4746ede5f0
3 changed files with 7 additions and 12 deletions

View File

@ -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)
db.message().setMessageUiHide(tuple.id, false);
}
// 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 {

View File

@ -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);

View File

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