1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 17:18:50 -05:00

Fixes issue 1199

This commit is contained in:
cketti 2010-02-09 15:41:40 +00:00
parent 03a06696dc
commit 80ae0402e5
2 changed files with 27 additions and 6 deletions

View File

@ -671,9 +671,10 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="remote_control_label">K-9 Mail remote control</string> <string name="remote_control_label">K-9 Mail remote control</string>
<string name="remote_control_desc">Allows this application to control K-9 Mail activities and settings.</string> <string name="remote_control_desc">Allows this application to control K-9 Mail activities and settings.</string>
<string name="account_setup_store_attachment_on_sd_card_label">Attachments On SD Cards</string> <string name="account_setup_store_attachment_on_sd_card_label">Attachments on SD card</string>
<string name="account_setup_store_attachment_on_sd_card_summary">Whether or not attachments are store on the SD card</string> <string name="account_setup_store_attachment_on_sd_card_summary">Whether or not attachments are stored on the SD card</string>
<string name="account_setup_store_attachment_on_sd_card_error">No SD card found</string> <string name="account_setup_store_attachment_on_sd_card_error">No SD card found</string>
<string name="sd_card_error">No SD card found</string> <string name="sd_card_error">No SD card found</string>
<string name="sd_card_skip">No SD card found. Skipping accounts with 'Attachments on SD card' enabled.</string>
</resources> </resources>

View File

@ -376,7 +376,14 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
} }
/*
* This method is called with 'null' for the argument 'account' if
* all accounts are to be checked. This is handled accordingly in
* MessagingController.checkMail().
*/
private void onCheckMail(Account account) private void onCheckMail(Account account)
{
if (account != null)
{ {
if (account.isStoreAttachmentOnSdCard() if (account.isStoreAttachmentOnSdCard()
&& !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) && !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
@ -384,6 +391,19 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
Toast.makeText(this, R.string.sd_card_error, Toast.LENGTH_SHORT).show(); Toast.makeText(this, R.string.sd_card_error, Toast.LENGTH_SHORT).show();
return; return;
} }
}
else
{
Account[] accounts = Preferences.getPreferences(this).getAccounts();
for (Account acc : accounts)
{
if (acc.isStoreAttachmentOnSdCard())
{
Toast.makeText(this, R.string.sd_card_skip, Toast.LENGTH_LONG).show();
break;
}
}
}
MessagingController.getInstance(getApplication()).checkMail(this, account, true, true, null); MessagingController.getInstance(getApplication()).checkMail(this, account, true, true, null);
} }