1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Fix "Folders" menu item and hotkey handling in MessageList

This commit is contained in:
cketti 2013-07-02 20:03:45 +02:00
parent b4c8afbe22
commit 1c6072a1cc

View File

@ -604,7 +604,9 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
return true; return true;
} }
case KeyEvent.KEYCODE_Q: { case KeyEvent.KEYCODE_Q: {
goBack(); if (mMessageListFragment != null && mMessageListFragment.isSingleAccountMode()) {
onShowFolderList();
}
return true; return true;
} }
case KeyEvent.KEYCODE_O: { case KeyEvent.KEYCODE_O: {
@ -1063,15 +1065,16 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
menu.findItem(R.id.select_all).setVisible(true); menu.findItem(R.id.select_all).setVisible(true);
menu.findItem(R.id.mark_all_as_read).setVisible( menu.findItem(R.id.mark_all_as_read).setVisible(
mMessageListFragment.isMarkAllAsReadSupported()); mMessageListFragment.isMarkAllAsReadSupported());
menu.findItem(R.id.show_folder_list).setVisible(mAccount == null ? false : true);
if (!mMessageListFragment.isSingleAccountMode()) { if (!mMessageListFragment.isSingleAccountMode()) {
menu.findItem(R.id.expunge).setVisible(false); menu.findItem(R.id.expunge).setVisible(false);
menu.findItem(R.id.send_messages).setVisible(false); menu.findItem(R.id.send_messages).setVisible(false);
menu.findItem(R.id.show_folder_list).setVisible(false);
} else { } else {
menu.findItem(R.id.send_messages).setVisible(mMessageListFragment.isOutbox()); menu.findItem(R.id.send_messages).setVisible(mMessageListFragment.isOutbox());
menu.findItem(R.id.expunge).setVisible(mMessageListFragment.isRemoteFolder() && menu.findItem(R.id.expunge).setVisible(mMessageListFragment.isRemoteFolder() &&
mMessageListFragment.isAccountExpungeCapable()); mMessageListFragment.isAccountExpungeCapable());
menu.findItem(R.id.show_folder_list).setVisible(true);
} }
menu.findItem(R.id.check_mail).setVisible(mMessageListFragment.isCheckMailSupported()); menu.findItem(R.id.check_mail).setVisible(mMessageListFragment.isCheckMailSupported());