1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-10-31 15:45:08 -04:00

Back, by popular demand, an empty trash button in the accounts context menu

This commit is contained in:
Jesse Vincent 2013-06-30 16:52:45 -04:00
parent 6649c19cb6
commit 969cbcb688
2 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,8 @@
android:title="@string/manage_accounts_move_up_action" />
<item android:id="@+id/move_down"
android:title="@string/manage_accounts_move_down_action" />
<item android:id="@+id/empty_trash"
android:title="@string/empty_trash_action" />
<item android:id="@+id/account_settings"
android:title="@string/account_settings_action" />
<item android:id="@+id/delete_account"

View File

@ -630,6 +630,11 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
MessagingController.getInstance(getApplication()).clearAllPending(account);
}
private void onEmptyTrash(Account account) {
MessagingController.getInstance(getApplication()).emptyTrash(account, null);
}
private void onCompose() {
Account defaultAccount = Preferences.getPreferences(this).getDefaultAccount();
if (defaultAccount != null) {
@ -1149,6 +1154,9 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
case R.id.clear_pending:
onClearCommands(realAccount);
break;
case R.id.empty_trash:
onEmptyTrash(realAccount);
break;
case R.id.clear:
onClear(realAccount);
break;