From 3ef22ca094527d7a4dbd77ca7c4d14e826e8928a Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 8 Sep 2012 23:16:32 -0400 Subject: [PATCH] When we're at the end of the message list, dim the next or prev button instead of making it vanish --- src/com/fsck/k9/activity/MessageView.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageView.java b/src/com/fsck/k9/activity/MessageView.java index 54cfba77a..0035acc52 100644 --- a/src/com/fsck/k9/activity/MessageView.java +++ b/src/com/fsck/k9/activity/MessageView.java @@ -827,8 +827,23 @@ public class MessageView extends K9Activity implements OnClickListener { menu.findItem(R.id.spam).setVisible(true); toggleActionsState(menu, true); - menu.findItem(R.id.next_message).setVisible(mNextMessage != null); - menu.findItem(R.id.previous_message).setVisible(mPreviousMessage != null); + if (mNextMessage != null ) { + + menu.findItem(R.id.next_message).setEnabled(true); + menu.findItem(R.id.next_message).getIcon().setAlpha(255); + } else { + menu.findItem(R.id.next_message).getIcon().setAlpha(127); + menu.findItem(R.id.next_message).setEnabled(false); + } + + if (mPreviousMessage != null ) { + + menu.findItem(R.id.previous_message).setEnabled(true); + menu.findItem(R.id.previous_message).getIcon().setAlpha(255); + } else { + menu.findItem(R.id.previous_message).getIcon().setAlpha(127); + menu.findItem(R.id.previous_message).setEnabled(false); + } // comply with the setting if (!mAccount.getEnableMoveButtons()) {