mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-11 03:24:52 +02:00
Refactoring
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user