mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 01:23:38 +02:00
Refactoring
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user