1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Show unread count on special accounts too.

This commit is contained in:
Sander Bogaert 2012-08-27 14:19:09 -04:00 committed by Andrew Chen
parent ac0f99d3df
commit bc9bc29097
3 changed files with 21 additions and 17 deletions

View File

@ -9,7 +9,7 @@
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:orientation="vertical" >
<TextView

View File

@ -9,7 +9,7 @@
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:orientation="vertical" >
<TextView

View File

@ -521,20 +521,22 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
mActionBarTitle.setText(displayName);
mActionBarSubTitle.setText(mAccount.getEmail());
// query result display
} else if (mQueryString != null) {
if (mTitle != null) {
mActionBarTitle.setText(mTitle);
} else {
mActionBarTitle.setText(getString(R.string.search_results));
}
}
// set unread count
if (mUnreadMessageCount == 0) {
mActionBarUnread.setVisibility(View.GONE);
} else {
mActionBarUnread.setText(Integer.toString(mUnreadMessageCount));
mActionBarUnread.setVisibility(View.VISIBLE);
}
// query result display
} else if (mQueryString != null) {
if (mTitle != null) {
setTitle(mTitle);
} else {
setTitle(getString(R.string.search_results));
}
}
}
private void progress(final boolean progress) {
@ -907,7 +909,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
}
private void initializeActionBar() {
if (mQueryString == null) {
mActionBar.setDisplayShowCustomEnabled(true);
mActionBar.setCustomView(R.layout.actionbar_custom);
@ -915,6 +916,9 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
mActionBarTitle = (TextView) customView.findViewById(R.id.actionbar_title_first);
mActionBarSubTitle = (TextView) customView.findViewById(R.id.actionbar_title_sub);
mActionBarUnread = (TextView) customView.findViewById(R.id.actionbar_unread_count);
if (mQueryString != null) {
mActionBarSubTitle.setVisibility(View.GONE);
}
mActionBar.setDisplayHomeAsUpEnabled(true);