1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Replaced references to K9.INBOX with account.getInboxFolderName() and disabled the call to reverseTranslateFolder in case of WebDav account

This commit is contained in:
bitblaster 2011-04-05 02:14:56 -07:00 committed by Jesse Vincent
parent ccc79f62b9
commit 3290166749

View File

@ -700,7 +700,13 @@ public class AccountSettings extends K9PreferenceActivity {
mAccount.setCryptoAutoSignature(mCryptoAutoSignature.isChecked()); mAccount.setCryptoAutoSignature(mCryptoAutoSignature.isChecked());
mAccount.setLocalStorageProviderId(mLocalStorageProvider.getValue()); mAccount.setLocalStorageProviderId(mLocalStorageProvider.getValue());
mAccount.setAutoExpandFolderName(reverseTranslateFolder(mAutoExpandFolder.getValue())); // In webdav account we use the exact folder name also for inbox,
// since it varies because of internationalization
if(mAccount.getStoreUri().startsWith("webdav"))
mAccount.setAutoExpandFolderName(mAutoExpandFolder.getValue());
else
mAccount.setAutoExpandFolderName(reverseTranslateFolder(mAutoExpandFolder.getValue()));
mAccount.setArchiveFolderName(mArchiveFolder.getValue()); mAccount.setArchiveFolderName(mArchiveFolder.getValue());
mAccount.setDraftsFolderName(mDraftsFolder.getValue()); mAccount.setDraftsFolderName(mDraftsFolder.getValue());
mAccount.setSentFolderName(mSentFolder.getValue()); mAccount.setSentFolderName(mSentFolder.getValue());
@ -826,7 +832,7 @@ public class AccountSettings extends K9PreferenceActivity {
} }
private String translateFolder(String in) { private String translateFolder(String in) {
if (K9.INBOX.equalsIgnoreCase(in)) { if (mAccount.getInboxFolderName().equalsIgnoreCase(in)) {
return getString(R.string.special_mailbox_name_inbox); return getString(R.string.special_mailbox_name_inbox);
} else { } else {
return in; return in;
@ -835,7 +841,7 @@ public class AccountSettings extends K9PreferenceActivity {
private String reverseTranslateFolder(String in) { private String reverseTranslateFolder(String in) {
if (getString(R.string.special_mailbox_name_inbox).equals(in)) { if (getString(R.string.special_mailbox_name_inbox).equals(in)) {
return K9.INBOX; return mAccount.getInboxFolderName();
} else { } else {
return in; return in;
} }