diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 67d2b4f2f..256a31793 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -33,6 +33,11 @@ import java.util.concurrent.ConcurrentHashMap; * and delete itself given a Preferences to work with. Each account is defined by a UUID. */ public class Account implements BaseAccount { + /** + * Default value for the inbox folder (never changes for POP3 and IMAP) + */ + public static final String INBOX = "INBOX"; + 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"; @@ -181,8 +186,8 @@ public class Account implements BaseAccount { mEnableMoveButtons = false; mIsSignatureBeforeQuotedText = false; mExpungePolicy = EXPUNGE_IMMEDIATELY; - mAutoExpandFolderName = K9.INBOX; - mInboxFolderName = K9.INBOX; + mAutoExpandFolderName = INBOX; + mInboxFolderName = INBOX; mMaxPushFolders = 10; mChipColor = (new Random()).nextInt(0xffffff) + 0xff000000; goToUnreadMessageSearch = false; @@ -248,7 +253,7 @@ public class Account implements BaseAccount { mNotifySelfNewMail = prefs.getBoolean(mUuid + ".notifySelfNewMail", true); mNotifySync = prefs.getBoolean(mUuid + ".notifyMailCheck", false); mDeletePolicy = prefs.getInt(mUuid + ".deletePolicy", 0); - mInboxFolderName = prefs.getString(mUuid + ".inboxFolderName", K9.INBOX); + mInboxFolderName = prefs.getString(mUuid + ".inboxFolderName", INBOX); mDraftsFolderName = prefs.getString(mUuid + ".draftsFolderName", "Drafts"); mSentFolderName = prefs.getString(mUuid + ".sentFolderName", "Sent"); mTrashFolderName = prefs.getString(mUuid + ".trashFolderName", "Trash"); @@ -273,7 +278,7 @@ public class Account implements BaseAccount { compressionMap.put(type, useCompression); } - mAutoExpandFolderName = prefs.getString(mUuid + ".autoExpandFolderName", K9.INBOX); + mAutoExpandFolderName = prefs.getString(mUuid + ".autoExpandFolderName", INBOX); mAccountNumber = prefs.getInt(mUuid + ".accountNumber", 0); diff --git a/src/com/fsck/k9/K9.java b/src/com/fsck/k9/K9.java index 364c5188c..84f62a054 100644 --- a/src/com/fsck/k9/K9.java +++ b/src/com/fsck/k9/K9.java @@ -216,12 +216,6 @@ public class K9 extends Application { public static final String[] UNACCEPTABLE_ATTACHMENT_DOWNLOAD_TYPES = new String[] { }; - /** - * The special name "INBOX" is used throughout the application to mean "Whatever folder - * the server refers to as the user's Inbox. Placed here to ease use. - */ - public static final String INBOX = "INBOX"; - /** * For use when displaying that no folder is selected */ diff --git a/src/com/fsck/k9/activity/ActivityListener.java b/src/com/fsck/k9/activity/ActivityListener.java index 6fbfaec16..58c6eed77 100644 --- a/src/com/fsck/k9/activity/ActivityListener.java +++ b/src/com/fsck/k9/activity/ActivityListener.java @@ -6,7 +6,6 @@ import android.content.Context; import com.fsck.k9.Account; import com.fsck.k9.AccountStats; -import com.fsck.k9.K9; import com.fsck.k9.R; import com.fsck.k9.controller.MessagingListener; import com.fsck.k9.service.MailService; @@ -35,7 +34,7 @@ public class ActivityListener extends MessagingListener { if (mLoadingFolderName != null || mLoadingHeaderFolderName != null) { String displayName = mLoadingFolderName; - if (K9.INBOX.equalsIgnoreCase(displayName)) { + if (mAccount.getInboxFolderName().equalsIgnoreCase(displayName)) { displayName = context.getString(R.string.special_mailbox_name_inbox); } else if ((mAccount != null) && mAccount.getOutboxFolderName().equals(displayName)) { displayName = context.getString(R.string.special_mailbox_name_outbox);