From 574c544d645123d9684471663a73dbb489bea04a Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 16 Jan 2011 21:33:34 +0000 Subject: [PATCH] new helper routine for checking to see if a folder is special. --- src/com/fsck/k9/Account.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index a418b62cd..beb9486fa 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -924,6 +924,29 @@ public class Account implements BaseAccount this.mDeletePolicy = deletePolicy; } + + public boolean isSpecialFolder(String folderName) + { + if ( folderName != null && (folderName.equalsIgnoreCase(K9.INBOX) || + folderName.equals(getTrashFolderName()) || + folderName.equals(getDraftsFolderName()) || + folderName.equals(getArchiveFolderName()) || + folderName.equals(getSpamFolderName()) || + folderName.equals(getOutboxFolderName()) || + folderName.equals(getSentFolderName()) || + folderName.equals(getErrorFolderName()))) + { + return true; + + } + else + { + return false; + } + + } + + public synchronized String getDraftsFolderName() { return mDraftsFolderName;