mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Back, by popular demand, an empty trash button in the accounts context menu
This commit is contained in:
parent
4baaafcd88
commit
0a029561d1
@ -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"
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user