mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-31 07:10:14 -05:00
Hide move & copy options for mixed messagelists. Also use hide and show the new grouped icon for them correctly.
This commit is contained in:
parent
f0eafdf143
commit
9f568e3e08
@ -2766,6 +2766,7 @@ public class MessageList extends K9ListActivity implements
|
||||
menu.findItem(R.id.archive).setVisible(true);
|
||||
menu.findItem(R.id.spam).setVisible(true);
|
||||
menu.findItem(R.id.copy).setVisible(true);
|
||||
menu.findItem(R.id.move_or_copy).setVisible(true);
|
||||
|
||||
// hide uncapable
|
||||
/*
|
||||
@ -2804,6 +2805,21 @@ public class MessageList extends K9ListActivity implements
|
||||
}
|
||||
|
||||
private void setContextCapabilities(Account mAccount, Menu menu) {
|
||||
/*
|
||||
* TODO get rid of this when we finally split the messagelist into
|
||||
* a folder content display and a search result display
|
||||
*/
|
||||
if (mQueryString != null) {
|
||||
menu.findItem(R.id.move).setVisible(false);
|
||||
menu.findItem(R.id.copy).setVisible(false);
|
||||
menu.findItem(R.id.move_or_copy).setVisible(false);
|
||||
|
||||
menu.findItem(R.id.archive).setVisible(false);
|
||||
menu.findItem(R.id.spam).setVisible(false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// hide unsupported
|
||||
if (!mController.isCopyCapable(mAccount)) {
|
||||
menu.findItem(R.id.copy).setVisible(false);
|
||||
@ -2815,6 +2831,11 @@ public class MessageList extends K9ListActivity implements
|
||||
menu.findItem(R.id.spam).setVisible(false);
|
||||
}
|
||||
|
||||
if (!mController.isMoveCapable(mAccount)
|
||||
&& !mController.isCopyCapable(mAccount)) {
|
||||
menu.findItem(R.id.move_or_copy).setVisible(false);
|
||||
}
|
||||
|
||||
if (!mAccount.hasArchiveFolder()) {
|
||||
menu.findItem(R.id.archive).setVisible(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user