Refactoring

This commit is contained in:
M66B
2019-11-23 13:48:59 +01:00
parent e7d3716084
commit 92429f8c5e
16 changed files with 96 additions and 68 deletions

View File

@@ -705,7 +705,7 @@ public class ServiceSynchronize extends ServiceBase {
this, account.getProtocol(), account.realm, account.insecure, false, debug);
iservice.setPartialFetch(account.partial_fetch);
iservice.setIgnoreBodyStructureSize(account.ignore_size);
if (account.pop)
if (account.protocol != EntityAccount.TYPE_IMAP)
iservice.setLeaveOnServer(account.browse);
final Map<EntityFolder, IMAPFolder> mapFolders = new HashMap<>();
@@ -840,7 +840,7 @@ public class ServiceSynchronize extends ServiceBase {
});
// Update folder list
if (!account.pop)
if (account.protocol == EntityAccount.TYPE_IMAP)
Core.onSynchronizeFolders(this, account, iservice.getStore(), state);
// Open synchronizing folders
@@ -1047,7 +1047,7 @@ public class ServiceSynchronize extends ServiceBase {
// Get folder
Folder ifolder = mapFolders.get(folder); // null when polling
boolean canOpen = (!account.pop || EntityFolder.INBOX.equals(folder.type));
boolean canOpen = (account.protocol == EntityAccount.TYPE_IMAP || EntityFolder.INBOX.equals(folder.type));
final boolean shouldClose = (ifolder == null && canOpen);
try {