diff --git a/res/menu/message_list_option.xml b/res/menu/message_list_option.xml index ebbbff1c4..8e072732c 100644 --- a/res/menu/message_list_option.xml +++ b/res/menu/message_list_option.xml @@ -10,6 +10,22 @@ MessageList.configureMenu() if you make any changes to this file. --> + + + + + + - - - - - - - - - - - - - - - - - - diff --git a/res/menu/message_view_option.xml b/res/menu/message_view_option.xml deleted file mode 100644 index 4c1512aa6..000000000 --- a/res/menu/message_view_option.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 09b5bd47a..45edbf2bf 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -777,6 +777,14 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme return true; } // MessageView + case R.id.next_message: { + showNextMessage(); + return true; + } + case R.id.previous_message: { + showPreviousMessage(); + return true; + } case R.id.delete: { mMessageViewFragment.onDelete(); return true; @@ -897,6 +905,8 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme */ if (mMessageViewFragment == null || !mMessageViewFragment.isInitialized()) { + menu.findItem(R.id.next_message).setVisible(false); + menu.findItem(R.id.previous_message).setVisible(false); menu.findItem(R.id.delete).setVisible(false); menu.findItem(R.id.single_message_options).setVisible(false); menu.findItem(R.id.archive).setVisible(false); @@ -907,6 +917,11 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme menu.findItem(R.id.select_text).setVisible(false); menu.findItem(R.id.toggle_message_view_theme).setVisible(false); } else { + // hide prev/next buttons in split mode + if (mDisplayMode != DisplayMode.MESSAGE_VIEW) { + menu.findItem(R.id.next_message).setVisible(false); + menu.findItem(R.id.previous_message).setVisible(false); + } // Set title of menu item to switch to dark/light theme MenuItem toggleTheme = menu.findItem(R.id.toggle_message_view_theme); if (K9.getK9MessageViewTheme() == K9.THEME_DARK) {