Simplify folder-skip logic when cleaning out folders deleted on the
server. (Note that we no longer delete the archive folder locally, even if it's killed upstream)
This commit is contained in:
parent
c5846b4202
commit
a974f7188c
1 changed files with 1 additions and 10 deletions
|
@ -551,16 +551,7 @@ public class MessagingController implements Runnable
|
|||
for (Folder localFolder : localFolders)
|
||||
{
|
||||
String localFolderName = localFolder.getName();
|
||||
if (localFolderName.equalsIgnoreCase(K9.INBOX) ||
|
||||
localFolderName.equals(account.getTrashFolderName()) ||
|
||||
localFolderName.equals(account.getOutboxFolderName()) ||
|
||||
localFolderName.equals(account.getDraftsFolderName()) ||
|
||||
localFolderName.equals(account.getSentFolderName()) ||
|
||||
localFolderName.equals(account.getErrorFolderName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!remoteFolderNames.contains(localFolder.getName()))
|
||||
if (!account.isSpecialFolder(localFolderName) && !remoteFolderNames.contains(localFolderName))
|
||||
{
|
||||
localFolder.delete(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue