1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Set up some reasonableish defaults when creating folders

This commit is contained in:
Jesse Vincent 2011-01-18 00:04:24 +00:00
parent 65e89afc40
commit 951dbcbd33

View File

@ -1491,9 +1491,42 @@ public class LocalStore extends Store implements Serializable
mName, mName,
visibleLimit visibleLimit
}); });
return null; return null;
} }
}); });
// When created, special folders should always be displayed
// inbox should be integrated
// and the inbox and drafts folders should be syncced by default
if (mAccount.isSpecialFolder(mName))
{
LocalFolder f = new LocalFolder(mName);
f.open(OpenMode.READ_WRITE);
f.setInTopGroup(true);
f.setDisplayClass(FolderClass.FIRST_CLASS);
if (mName.equalsIgnoreCase(K9.INBOX))
{
f.setIntegrate(true);
f.setPushClass(FolderClass.FIRST_CLASS);
}
else
{
f.setPushClass(FolderClass.INHERITED);
}
if ( mName.equalsIgnoreCase(K9.INBOX) ||
mName.equalsIgnoreCase(mAccount.getDraftsFolderName()) )
{
f.setSyncClass(FolderClass.FIRST_CLASS);
}
else
{
f.setSyncClass(FolderClass.NO_CLASS);
}
}
return true; return true;
} }