mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-23 16:25:30 +00:00
Check folder capability
This commit is contained in:
parent
eae3c254ac
commit
1280dfc2dd
1 changed files with 7 additions and 1 deletions
|
@ -955,7 +955,13 @@ class Core {
|
|||
db.message().deleteMessage(message.id);
|
||||
}
|
||||
|
||||
boolean canMove = istore.hasCapability("MOVE");
|
||||
// Some servers return different capabilities for different sessions
|
||||
boolean canMove = (Boolean) ifolder.doCommand(new IMAPFolder.ProtocolCommand() {
|
||||
@Override
|
||||
public Object doCommand(IMAPProtocol protocol) throws ProtocolException {
|
||||
return protocol.hasCapability("MOVE");
|
||||
}
|
||||
});
|
||||
|
||||
// Some providers do not support the COPY operation for drafts
|
||||
boolean draft = (EntityFolder.DRAFTS.equals(folder.type) || EntityFolder.DRAFTS.equals(target.type));
|
||||
|
|
Loading…
Reference in a new issue