Individual folders can have no NOTIFY support

pull/217/head
M66B 11 months ago
parent 18343c1ccf
commit 823b6f2e4f

@ -2127,7 +2127,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
EntityOperation.sync(this, folder.id, false, force && !forced); EntityOperation.sync(this, folder.id, false, force && !forced);
if (capNotify && subscriptions && EntityFolder.INBOX.equals(folder.type)) if (capNotify && subscriptions &&
EntityFolder.INBOX.equals(folder.type) &&
MessageHelper.hasCapability(ifolder, "NOTIFY"))
ifolder.doCommand(new IMAPFolder.ProtocolCommand() { ifolder.doCommand(new IMAPFolder.ProtocolCommand() {
@Override @Override
public Object doCommand(IMAPProtocol protocol) throws ProtocolException { public Object doCommand(IMAPProtocol protocol) throws ProtocolException {
@ -2144,8 +2146,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (responses.length == 0) if (responses.length == 0)
throw new ProtocolException("No response"); throw new ProtocolException("No response");
if (!responses[responses.length - 1].isOK()) if (!responses[responses.length - 1].isOK()) {
throw new ProtocolException(responses[responses.length - 1]); Log.w(new ProtocolException(responses[responses.length - 1]));
return null;
}
for (int i = 0; i < responses.length - 1; i++) { for (int i = 0; i < responses.length - 1; i++) {
EntityLog.log(ServiceSynchronize.this, EntityLog.Type.Account, account, EntityLog.log(ServiceSynchronize.this, EntityLog.Type.Account, account,

Loading…
Cancel
Save