mirror of
https://github.com/moparisthebest/k-9
synced 2024-08-13 17:03:48 -04:00
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
@ -551,16 +551,7 @@ public class MessagingController implements Runnable
|
|||||||
for (Folder localFolder : localFolders)
|
for (Folder localFolder : localFolders)
|
||||||
{
|
{
|
||||||
String localFolderName = localFolder.getName();
|
String localFolderName = localFolder.getName();
|
||||||
if (localFolderName.equalsIgnoreCase(K9.INBOX) ||
|
if (!account.isSpecialFolder(localFolderName) && !remoteFolderNames.contains(localFolderName))
|
||||||
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()))
|
|
||||||
{
|
{
|
||||||
localFolder.delete(false);
|
localFolder.delete(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user