From 67b4cd9c8eef40fc7f72392ef07f7f870791f36f Mon Sep 17 00:00:00 2001 From: Sander Bogaert Date: Tue, 17 Jul 2012 09:17:29 -0400 Subject: [PATCH] Add unread count to MessageList title --- src/com/fsck/k9/activity/MessageList.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index a60939515..8cf8fbdd0 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -529,19 +529,13 @@ public class MessageList private void setWindowTitle() { String displayName; + // regular folder content display if (mFolderName != null) { - displayName = mFolderName; - if (mAccount.getInboxFolderName().equalsIgnoreCase(displayName)) { - displayName = getString(R.string.special_mailbox_name_inbox); - } else if (mAccount.getOutboxFolderName().equals(displayName)) { - displayName = getString(R.string.special_mailbox_name_outbox); - } - - String dispString = mAdapter.mListener.formatHeader(MessageList.this, getString(R.string.message_list_title, mAccount.getDescription(), displayName), mUnreadMessageCount, getTimeFormat()); - - mNavigationSpinner.setTitle(mFolderName); + mNavigationSpinner.setTitle(mFolderName+" ["+mUnreadMessageCount+"]"); mNavigationSpinner.setSubTitle(mAccount.getEmail()); + + // query result display } else if (mQueryString != null) { if (mTitle != null) { String dispString = mAdapter.mListener.formatHeader(MessageList.this, mTitle, mUnreadMessageCount, getTimeFormat());