From 8e1c4acef943efe52e24c38c9a1e8586e5f53312 Mon Sep 17 00:00:00 2001 From: cketti Date: Sun, 8 May 2011 02:22:38 +0200 Subject: [PATCH] Get rid of constant K9.OUTBOX Use Account.getOutboxFolderName() instead (still hardcoded, though) --- src/com/fsck/k9/Account.java | 7 ++++++- src/com/fsck/k9/K9.java | 6 ------ src/com/fsck/k9/mail/store/ImapStore.java | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 256a31793..7508e87cb 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -38,6 +38,11 @@ public class Account implements BaseAccount { */ public static final String INBOX = "INBOX"; + /** + * This local folder is used to store messages to be sent. + */ + public static final String OUTBOX = "OUTBOX"; + public static final String EXPUNGE_IMMEDIATELY = "EXPUNGE_IMMEDIATELY"; public static final String EXPUNGE_MANUALLY = "EXPUNGE_MANUALLY"; public static final String EXPUNGE_ON_POLL = "EXPUNGE_ON_POLL"; @@ -832,7 +837,7 @@ public class Account implements BaseAccount { } public synchronized String getOutboxFolderName() { - return K9.OUTBOX; + return OUTBOX; } public synchronized String getAutoExpandFolderName() { diff --git a/src/com/fsck/k9/K9.java b/src/com/fsck/k9/K9.java index 84f62a054..0c5da2007 100644 --- a/src/com/fsck/k9/K9.java +++ b/src/com/fsck/k9/K9.java @@ -144,12 +144,6 @@ 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; private static boolean mConfirmDelete = false; diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 4eeb3bea0..56e0f8a52 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -398,7 +398,7 @@ public class ImapStore extends Store { if (folder.equalsIgnoreCase(mAccount.getInboxFolderName())) { continue; - } else if (folder.equalsIgnoreCase(K9.OUTBOX)) { + } else if (folder.equals(mAccount.getOutboxFolderName())) { /* * There is a folder on the server with the same name as our local * outbox. Until we have a good plan to deal with this situation