1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 03:32:16 -05:00

Restored automatic creation of a local folder on open. Why was this

removed in K9?  I can't find the history of LocalStore.java to find
the answer.  Eliminated now redundant creation of Outbox and Drafts
folders.
This commit is contained in:
Daniel Applebaum 2008-12-31 16:05:03 +00:00
parent b7605ca148
commit 4cc1ea489a
2 changed files with 3 additions and 12 deletions

View File

@ -1392,10 +1392,6 @@ s * critical data as fast as possible, and then we'll fill in the de
Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication);
LocalFolder localFolder = (LocalFolder)localStore.getFolder(account.getErrorFolderName());
if (localFolder.exists() == false)
{
localFolder.create(Folder.FolderType.HOLDS_MESSAGES);
}
Message[] messages = new Message[1];
Message message = new MimeMessage();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@ -1733,10 +1729,6 @@ s * critical data as fast as possible, and then we'll fill in the de
Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication);
LocalFolder localFolder =
(LocalFolder) localStore.getFolder(account.getOutboxFolderName());
if (!localFolder.exists())
{
localFolder.create(Folder.FolderType.HOLDS_MESSAGES);
}
localFolder.open(OpenMode.READ_WRITE);
localFolder.appendMessages(new Message[] {
message
@ -2236,10 +2228,6 @@ s * critical data as fast as possible, and then we'll fill in the de
Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication);
LocalFolder localFolder =
(LocalFolder) localStore.getFolder(account.getDraftsFolderName());
if (!localFolder.exists())
{
localFolder.create(Folder.FolderType.HOLDS_MESSAGES);
}
localFolder.open(OpenMode.READ_WRITE);
localFolder.appendMessages(new Message[] {
message

View File

@ -359,6 +359,9 @@ public class LocalStore extends Store implements Serializable {
if (isOpen()) {
return;
}
if (!exists()) {
create(FolderType.HOLDS_MESSAGES);
}
Cursor cursor = null;
try {
cursor = mDb.rawQuery("SELECT id, unread_count, visible_limit, last_updated, status FROM folders "