From d7f55f2ac2e550b25d921ec8ee20a42e1ce2093e Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 16 Aug 2024 09:39:45 +0200 Subject: [PATCH] Revert "Improved VANISHED handling" This reverts commit a03cf0af300a4e57addc593a7fbfdbe6aad51951. --- .../java/com/sun/mail/imap/IMAPFolder.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/app/src/main/java/com/sun/mail/imap/IMAPFolder.java b/app/src/main/java/com/sun/mail/imap/IMAPFolder.java index 07244b9f3f..d069f27921 100644 --- a/app/src/main/java/com/sun/mail/imap/IMAPFolder.java +++ b/app/src/main/java/com/sun/mail/imap/IMAPFolder.java @@ -3635,22 +3635,6 @@ public class IMAPFolder extends Folder implements UIDFolder, ResponseHandler { // response // "VANISHED" SP ["(EARLIER)"] SP known-uids - ir.readAtomStringList(); // Skip EARLIER - String uids = ir.readAtom(); - UIDSet[] uidset = UIDSet.parseUIDSets(uids); - List msgs = new ArrayList<>(); - for (long uid : UIDSet.toArray(uidset)) { - Message m = uidTable.get(uid); - if (m != null && m.getMessageNumber() > 0) { - realTotal--; - messageCache.expungeMessage(m.getMessageNumber()); - msgs.add(m); - } - } - if (!msgs.isEmpty() && - doExpungeNotification && hasMessageCountListener) - notifyMessageRemovedListeners(true, msgs.toArray(new Message[0])); -/* String[] s = ir.readAtomStringList(); if (s == null) { // no (EARLIER) String uids = ir.readAtom(); @@ -3667,7 +3651,7 @@ public class IMAPFolder extends Folder implements UIDFolder, ResponseHandler { notifyMessageRemovedListeners(true, msgs); } } // else if (EARLIER), ignore -*/ + } else if (ir.keyEquals("FETCH")) { assert ir instanceof FetchResponse : "!ir instanceof FetchResponse"; Message msg = processFetchResponse((FetchResponse)ir);