mirror of https://github.com/M66B/FairEmail.git
Restore orphan POP3 moves
This commit is contained in:
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)
|
||||
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 {
|
||||
|
|
|
@ -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…
Reference in New Issue