mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-22 07:42:52 +00:00
Improved workaround for expunged messages
This commit is contained in:
parent
31b31aca47
commit
d83db8be77
2 changed files with 53 additions and 0 deletions
|
@ -1697,4 +1697,26 @@ public class IMAPMessage extends MimeMessage implements ReadableMime {
|
||||||
Session _getSession() {
|
Session _getSession() {
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isExpunged() {
|
||||||
|
if (super.isExpunged())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// Workaround expunged messages without deleted flag
|
||||||
|
if (envelope != null &&
|
||||||
|
envelope.date == null &&
|
||||||
|
envelope.subject == null &&
|
||||||
|
envelope.from == null &&
|
||||||
|
envelope.sender == null &&
|
||||||
|
envelope.replyTo == null &&
|
||||||
|
envelope.to == null &&
|
||||||
|
envelope.cc == null &&
|
||||||
|
envelope.inReplyTo == null &&
|
||||||
|
envelope.messageId == null &&
|
||||||
|
headersLoaded && loadedHeaders.size() == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,3 +42,34 @@ index 866f17737..929e82d33 100644
|
||||||
/**
|
/**
|
||||||
* Set the user name to be used with the PROXYAUTH command.
|
* Set the user name to be used with the PROXYAUTH command.
|
||||||
* The PROXYAUTH user name can also be set using the
|
* The PROXYAUTH user name can also be set using the
|
||||||
|
diff --git a/app/src/main/java/com/sun/mail/imap/IMAPMessage.java b/app/src/main/java/com/sun/mail/imap/IMAPMessage.java
|
||||||
|
index 453479d98..acd5b42f9 100644
|
||||||
|
--- a/app/src/main/java/com/sun/mail/imap/IMAPMessage.java
|
||||||
|
+++ b/app/src/main/java/com/sun/mail/imap/IMAPMessage.java
|
||||||
|
@@ -1697,4 +1697,26 @@ public class IMAPMessage extends MimeMessage implements ReadableMime {
|
||||||
|
Session _getSession() {
|
||||||
|
return session;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean isExpunged() {
|
||||||
|
+ if (super.isExpunged())
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ // Workaround expunged messages without deleted flag
|
||||||
|
+ if (envelope != null &&
|
||||||
|
+ envelope.date == null &&
|
||||||
|
+ envelope.subject == null &&
|
||||||
|
+ envelope.from == null &&
|
||||||
|
+ envelope.sender == null &&
|
||||||
|
+ envelope.replyTo == null &&
|
||||||
|
+ envelope.to == null &&
|
||||||
|
+ envelope.cc == null &&
|
||||||
|
+ envelope.inReplyTo == null &&
|
||||||
|
+ envelope.messageId == null &&
|
||||||
|
+ headersLoaded && loadedHeaders.size() == 0)
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue