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

Fixes Issue 587

"Delete from server" is now the default delete policy for IMAP and
WebDAV accounts.  POP3 accounts still default to "Do not delete from
server"
This commit is contained in:
Daniel Applebaum 2009-11-15 01:21:19 +00:00
parent 730352c08c
commit eec4a96617
2 changed files with 5 additions and 4 deletions

View File

@ -250,9 +250,6 @@ public class AccountSetupBasics extends K9Activity
mAccount.setTrashFolderName(getString(R.string.special_mailbox_name_trash));
mAccount.setOutboxFolderName(getString(R.string.special_mailbox_name_outbox));
mAccount.setSentFolderName(getString(R.string.special_mailbox_name_sent));
if (incomingUri.toString().startsWith("imap")) {
mAccount.setDeletePolicy(Account.DELETE_POLICY_ON_DELETE);
}
AccountSetupCheckSettings.actionCheckSettings(this, mAccount, true, true);
}

View File

@ -216,6 +216,9 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
findViewById(R.id.imap_folder_setup_section).setVisibility(View.GONE);
findViewById(R.id.webdav_path_prefix_section).setVisibility(View.GONE);
findViewById(R.id.webdav_path_debug_section).setVisibility(View.GONE);
mAccount.setDeletePolicy(Account.DELETE_POLICY_NEVER);
} else if (uri.getScheme().startsWith("imap")) {
serverLabelView.setText(R.string.account_setup_incoming_imap_server_label);
mAccountPorts = imapPorts;
@ -226,7 +229,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
}
findViewById(R.id.webdav_path_prefix_section).setVisibility(View.GONE);
findViewById(R.id.webdav_path_debug_section).setVisibility(View.GONE);
mAccount.setDeletePolicy(Account.DELETE_POLICY_ON_DELETE);
} else if (uri.getScheme().startsWith("webdav")) {
serverLabelView.setText(R.string.account_setup_incoming_webdav_server_label);
mAccountPorts = webdavPorts;
@ -257,6 +260,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
}
}
}
mAccount.setDeletePolicy(Account.DELETE_POLICY_ON_DELETE);
} else {
throw new Exception("Unknown account type: " + mAccount.getStoreUri());
}