1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-17 21:32:26 -05:00

Add unread count to MessageList title

This commit is contained in:
Sander Bogaert 2012-07-17 09:17:29 -04:00 committed by Andrew Chen
parent b90386ecd3
commit 67b4cd9c8e

View File

@ -529,19 +529,13 @@ public class MessageList
private void setWindowTitle() { private void setWindowTitle() {
String displayName; String displayName;
// regular folder content display
if (mFolderName != null) { if (mFolderName != null) {
displayName = mFolderName;
if (mAccount.getInboxFolderName().equalsIgnoreCase(displayName)) { mNavigationSpinner.setTitle(mFolderName+" ["+mUnreadMessageCount+"]");
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.setSubTitle(mAccount.getEmail()); mNavigationSpinner.setSubTitle(mAccount.getEmail());
// query result display
} else if (mQueryString != null) { } else if (mQueryString != null) {
if (mTitle != null) { if (mTitle != null) {
String dispString = mAdapter.mListener.formatHeader(MessageList.this, mTitle, mUnreadMessageCount, getTimeFormat()); String dispString = mAdapter.mListener.formatHeader(MessageList.this, mTitle, mUnreadMessageCount, getTimeFormat());