mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -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" />
|
android:title="@string/manage_accounts_move_up_action" />
|
||||||
<item android:id="@+id/move_down"
|
<item android:id="@+id/move_down"
|
||||||
android:title="@string/manage_accounts_move_down_action" />
|
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"
|
<item android:id="@+id/account_settings"
|
||||||
android:title="@string/account_settings_action" />
|
android:title="@string/account_settings_action" />
|
||||||
<item android:id="@+id/delete_account"
|
<item android:id="@+id/delete_account"
|
||||||
|
@ -630,6 +630,11 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||||||
MessagingController.getInstance(getApplication()).clearAllPending(account);
|
MessagingController.getInstance(getApplication()).clearAllPending(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onEmptyTrash(Account account) {
|
||||||
|
MessagingController.getInstance(getApplication()).emptyTrash(account, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onCompose() {
|
private void onCompose() {
|
||||||
Account defaultAccount = Preferences.getPreferences(this).getDefaultAccount();
|
Account defaultAccount = Preferences.getPreferences(this).getDefaultAccount();
|
||||||
if (defaultAccount != null) {
|
if (defaultAccount != null) {
|
||||||
@ -1149,6 +1154,9 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||||||
case R.id.clear_pending:
|
case R.id.clear_pending:
|
||||||
onClearCommands(realAccount);
|
onClearCommands(realAccount);
|
||||||
break;
|
break;
|
||||||
|
case R.id.empty_trash:
|
||||||
|
onEmptyTrash(realAccount);
|
||||||
|
break;
|
||||||
case R.id.clear:
|
case R.id.clear:
|
||||||
onClear(realAccount);
|
onClear(realAccount);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user