mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Refactoring
This commit is contained in:
parent
55f571de91
commit
c72a3f5f80
2 changed files with 5 additions and 1 deletions
|
@ -140,6 +140,10 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
|||
public String error;
|
||||
public Long last_connected;
|
||||
|
||||
boolean isGmail() {
|
||||
return "imap.gmail.com".equalsIgnoreCase(host);
|
||||
}
|
||||
|
||||
String getProtocol() {
|
||||
switch (protocol) {
|
||||
case TYPE_IMAP:
|
||||
|
|
|
@ -189,7 +189,7 @@ public class EntityOperation {
|
|||
}
|
||||
|
||||
EntityAccount account = db.account().getAccount(message.account);
|
||||
if (!"imap.gmail.com".equalsIgnoreCase(account == null ? null : account.host) ||
|
||||
if ((account != null && !account.isGmail()) ||
|
||||
!EntityFolder.ARCHIVE.equals(source.type) ||
|
||||
EntityFolder.TRASH.equals(target.type) || EntityFolder.JUNK.equals(target.type))
|
||||
db.message().setMessageUiHide(message.id, true);
|
||||
|
|
Loading…
Reference in a new issue