From c2f96dad6d2ea8ef8a7d1d1a032b781fb138b6ad Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 7 May 2011 23:57:47 +0200 Subject: [PATCH] Restore hardcoded Outbox --- src/com/fsck/k9/Account.java | 10 +--------- src/com/fsck/k9/K9.java | 10 +++++----- src/com/fsck/k9/activity/setup/AccountSettings.java | 2 +- src/com/fsck/k9/mail/store/WebDavStore.java | 3 +++ 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 9dd61ba9d..67d2b4f2f 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -86,7 +86,6 @@ public class Account implements BaseAccount { private String mTrashFolderName; private String mArchiveFolderName; private String mSpamFolderName; - private String mOutboxFolderName; private String mAutoExpandFolderName; private FolderMode mFolderDisplayMode; private FolderMode mFolderSyncMode; @@ -255,7 +254,6 @@ public class Account implements BaseAccount { mTrashFolderName = prefs.getString(mUuid + ".trashFolderName", "Trash"); mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName", "Archive"); mSpamFolderName = prefs.getString(mUuid + ".spamFolderName", "Spam"); - mOutboxFolderName = prefs.getString(mUuid + ".outboxFolderName", "Outbox"); mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY); mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true); @@ -398,7 +396,6 @@ public class Account implements BaseAccount { editor.remove(mUuid + ".trashFolderName"); editor.remove(mUuid + ".archiveFolderName"); editor.remove(mUuid + ".spamFolderName"); - editor.remove(mUuid + ".outboxFolderName"); editor.remove(mUuid + ".autoExpandFolderName"); editor.remove(mUuid + ".accountNumber"); editor.remove(mUuid + ".vibrate"); @@ -496,7 +493,6 @@ public class Account implements BaseAccount { editor.putString(mUuid + ".trashFolderName", mTrashFolderName); editor.putString(mUuid + ".archiveFolderName", mArchiveFolderName); editor.putString(mUuid + ".spamFolderName", mSpamFolderName); - editor.putString(mUuid + ".outboxFolderName", mOutboxFolderName); editor.putString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName); editor.putInt(mUuid + ".accountNumber", mAccountNumber); editor.putString(mUuid + ".hideButtonsEnum", mScrollMessageViewButtons.name()); @@ -831,11 +827,7 @@ public class Account implements BaseAccount { } public synchronized String getOutboxFolderName() { - return mOutboxFolderName; - } - - public synchronized void setOutboxFolderName(String outboxFolderName) { - mOutboxFolderName = outboxFolderName; + return K9.OUTBOX; } public synchronized String getAutoExpandFolderName() { diff --git a/src/com/fsck/k9/K9.java b/src/com/fsck/k9/K9.java index edca02526..814e9ef23 100644 --- a/src/com/fsck/k9/K9.java +++ b/src/com/fsck/k9/K9.java @@ -144,6 +144,11 @@ public class K9 extends Application { public static boolean ENABLE_ERROR_FOLDER = true; public static String ERROR_FOLDER_NAME = "K9mail-errors"; + /** + * This local folder is used to store messages to be sent. + */ + public static final String OUTBOX = "OUTBOX"; + private static boolean mAnimations = true; @@ -217,11 +222,6 @@ public class K9 extends Application { */ public static final String INBOX = "INBOX"; - /** - * This local folder is used to store messages to be sent. - */ - public static final String OUTBOX = "OUTBOX"; - /** * For use when displaying that no folder is selected */ diff --git a/src/com/fsck/k9/activity/setup/AccountSettings.java b/src/com/fsck/k9/activity/setup/AccountSettings.java index 69f35cb6e..3a67198fb 100644 --- a/src/com/fsck/k9/activity/setup/AccountSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSettings.java @@ -873,7 +873,7 @@ public class AccountSettings extends K9PreferenceActivity { Iterator iter = folders.iterator(); while (iter.hasNext()) { Folder folder = iter.next(); - if (mAccount.getOutboxFolderName() != null && mAccount.getOutboxFolderName().equalsIgnoreCase(folder.getName())) { + if (mAccount.getOutboxFolderName().equals(folder.getName())) { iter.remove(); } } diff --git a/src/com/fsck/k9/mail/store/WebDavStore.java b/src/com/fsck/k9/mail/store/WebDavStore.java index 69d788c89..0f8714a36 100644 --- a/src/com/fsck/k9/mail/store/WebDavStore.java +++ b/src/com/fsck/k9/mail/store/WebDavStore.java @@ -272,9 +272,12 @@ public class WebDavStore extends Store { if (folderName != null) mAccount.setSpamFolderName(folderName); + // K-9 Mail's outbox is a special local folder and different from Exchange/WebDAV's outbox. + /* folderName = getFolderName(specialFoldersMap.get(DAV_MAIL_OUTBOX_FOLDER)); if (folderName != null) mAccount.setOutboxFolderName(folderName); + */ folderName = getFolderName(specialFoldersMap.get(DAV_MAIL_SENT_FOLDER)); if (folderName != null)