mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28:50 -05:00
Set up some reasonableish defaults when creating folders
This commit is contained in:
parent
65e89afc40
commit
951dbcbd33
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user