1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Restore hardcoded Outbox

This commit is contained in:
cketti 2011-05-07 23:57:47 +02:00
parent 13db62fcb6
commit 92ea452163
4 changed files with 10 additions and 15 deletions

View File

@ -86,7 +86,6 @@ public class Account implements BaseAccount {
private String mTrashFolderName; private String mTrashFolderName;
private String mArchiveFolderName; private String mArchiveFolderName;
private String mSpamFolderName; private String mSpamFolderName;
private String mOutboxFolderName;
private String mAutoExpandFolderName; private String mAutoExpandFolderName;
private FolderMode mFolderDisplayMode; private FolderMode mFolderDisplayMode;
private FolderMode mFolderSyncMode; private FolderMode mFolderSyncMode;
@ -255,7 +254,6 @@ public class Account implements BaseAccount {
mTrashFolderName = prefs.getString(mUuid + ".trashFolderName", "Trash"); mTrashFolderName = prefs.getString(mUuid + ".trashFolderName", "Trash");
mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName", "Archive"); mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName", "Archive");
mSpamFolderName = prefs.getString(mUuid + ".spamFolderName", "Spam"); mSpamFolderName = prefs.getString(mUuid + ".spamFolderName", "Spam");
mOutboxFolderName = prefs.getString(mUuid + ".outboxFolderName", "Outbox");
mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY); mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY);
mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true); mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true);
@ -398,7 +396,6 @@ public class Account implements BaseAccount {
editor.remove(mUuid + ".trashFolderName"); editor.remove(mUuid + ".trashFolderName");
editor.remove(mUuid + ".archiveFolderName"); editor.remove(mUuid + ".archiveFolderName");
editor.remove(mUuid + ".spamFolderName"); editor.remove(mUuid + ".spamFolderName");
editor.remove(mUuid + ".outboxFolderName");
editor.remove(mUuid + ".autoExpandFolderName"); editor.remove(mUuid + ".autoExpandFolderName");
editor.remove(mUuid + ".accountNumber"); editor.remove(mUuid + ".accountNumber");
editor.remove(mUuid + ".vibrate"); editor.remove(mUuid + ".vibrate");
@ -496,7 +493,6 @@ public class Account implements BaseAccount {
editor.putString(mUuid + ".trashFolderName", mTrashFolderName); editor.putString(mUuid + ".trashFolderName", mTrashFolderName);
editor.putString(mUuid + ".archiveFolderName", mArchiveFolderName); editor.putString(mUuid + ".archiveFolderName", mArchiveFolderName);
editor.putString(mUuid + ".spamFolderName", mSpamFolderName); editor.putString(mUuid + ".spamFolderName", mSpamFolderName);
editor.putString(mUuid + ".outboxFolderName", mOutboxFolderName);
editor.putString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName); editor.putString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName);
editor.putInt(mUuid + ".accountNumber", mAccountNumber); editor.putInt(mUuid + ".accountNumber", mAccountNumber);
editor.putString(mUuid + ".hideButtonsEnum", mScrollMessageViewButtons.name()); editor.putString(mUuid + ".hideButtonsEnum", mScrollMessageViewButtons.name());
@ -831,11 +827,7 @@ public class Account implements BaseAccount {
} }
public synchronized String getOutboxFolderName() { public synchronized String getOutboxFolderName() {
return mOutboxFolderName; return K9.OUTBOX;
}
public synchronized void setOutboxFolderName(String outboxFolderName) {
mOutboxFolderName = outboxFolderName;
} }
public synchronized String getAutoExpandFolderName() { public synchronized String getAutoExpandFolderName() {

View File

@ -144,6 +144,11 @@ public class K9 extends Application {
public static boolean ENABLE_ERROR_FOLDER = true; public static boolean ENABLE_ERROR_FOLDER = true;
public static String ERROR_FOLDER_NAME = "K9mail-errors"; 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 mAnimations = true;
@ -217,11 +222,6 @@ public class K9 extends Application {
*/ */
public static final String INBOX = "INBOX"; 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 * For use when displaying that no folder is selected
*/ */

View File

@ -873,7 +873,7 @@ public class AccountSettings extends K9PreferenceActivity {
Iterator <? extends Folder > iter = folders.iterator(); Iterator <? extends Folder > iter = folders.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
Folder folder = iter.next(); Folder folder = iter.next();
if (mAccount.getOutboxFolderName() != null && mAccount.getOutboxFolderName().equalsIgnoreCase(folder.getName())) { if (mAccount.getOutboxFolderName().equals(folder.getName())) {
iter.remove(); iter.remove();
} }
} }

View File

@ -272,9 +272,12 @@ public class WebDavStore extends Store {
if (folderName != null) if (folderName != null)
mAccount.setSpamFolderName(folderName); 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)); folderName = getFolderName(specialFoldersMap.get(DAV_MAIL_OUTBOX_FOLDER));
if (folderName != null) if (folderName != null)
mAccount.setOutboxFolderName(folderName); mAccount.setOutboxFolderName(folderName);
*/
folderName = getFolderName(specialFoldersMap.get(DAV_MAIL_SENT_FOLDER)); folderName = getFolderName(specialFoldersMap.get(DAV_MAIL_SENT_FOLDER));
if (folderName != null) if (folderName != null)