diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index d51036b65..9d0f4fc29 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -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); }