mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 05:02:26 -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:
parent
b7605ca148
commit
4cc1ea489a
@ -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);
|
Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication);
|
||||||
LocalFolder localFolder = (LocalFolder)localStore.getFolder(account.getErrorFolderName());
|
LocalFolder localFolder = (LocalFolder)localStore.getFolder(account.getErrorFolderName());
|
||||||
if (localFolder.exists() == false)
|
|
||||||
{
|
|
||||||
localFolder.create(Folder.FolderType.HOLDS_MESSAGES);
|
|
||||||
}
|
|
||||||
Message[] messages = new Message[1];
|
Message[] messages = new Message[1];
|
||||||
Message message = new MimeMessage();
|
Message message = new MimeMessage();
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
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);
|
Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication);
|
||||||
LocalFolder localFolder =
|
LocalFolder localFolder =
|
||||||
(LocalFolder) localStore.getFolder(account.getOutboxFolderName());
|
(LocalFolder) localStore.getFolder(account.getOutboxFolderName());
|
||||||
if (!localFolder.exists())
|
|
||||||
{
|
|
||||||
localFolder.create(Folder.FolderType.HOLDS_MESSAGES);
|
|
||||||
}
|
|
||||||
localFolder.open(OpenMode.READ_WRITE);
|
localFolder.open(OpenMode.READ_WRITE);
|
||||||
localFolder.appendMessages(new Message[] {
|
localFolder.appendMessages(new Message[] {
|
||||||
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);
|
Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication);
|
||||||
LocalFolder localFolder =
|
LocalFolder localFolder =
|
||||||
(LocalFolder) localStore.getFolder(account.getDraftsFolderName());
|
(LocalFolder) localStore.getFolder(account.getDraftsFolderName());
|
||||||
if (!localFolder.exists())
|
|
||||||
{
|
|
||||||
localFolder.create(Folder.FolderType.HOLDS_MESSAGES);
|
|
||||||
}
|
|
||||||
localFolder.open(OpenMode.READ_WRITE);
|
localFolder.open(OpenMode.READ_WRITE);
|
||||||
localFolder.appendMessages(new Message[] {
|
localFolder.appendMessages(new Message[] {
|
||||||
message
|
message
|
||||||
|
@ -359,6 +359,9 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
if (isOpen()) {
|
if (isOpen()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!exists()) {
|
||||||
|
create(FolderType.HOLDS_MESSAGES);
|
||||||
|
}
|
||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
try {
|
try {
|
||||||
cursor = mDb.rawQuery("SELECT id, unread_count, visible_limit, last_updated, status FROM folders "
|
cursor = mDb.rawQuery("SELECT id, unread_count, visible_limit, last_updated, status FROM folders "
|
||||||
|
Loading…
Reference in New Issue
Block a user