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:
parent
ac0f99d3df
commit
bc9bc29097
@ -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
|
||||
|
@ -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
|
||||
|
@ -521,20 +521,22 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
||||
mActionBarTitle.setText(displayName);
|
||||
mActionBarSubTitle.setText(mAccount.getEmail());
|
||||
|
||||
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);
|
||||
mActionBarTitle.setText(mTitle);
|
||||
} else {
|
||||
setTitle(getString(R.string.search_results));
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
private void progress(final boolean progress) {
|
||||
@ -907,14 +909,16 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
||||
}
|
||||
|
||||
private void initializeActionBar() {
|
||||
if (mQueryString == null) {
|
||||
mActionBar.setDisplayShowCustomEnabled(true);
|
||||
mActionBar.setCustomView(R.layout.actionbar_custom);
|
||||
mActionBar.setDisplayShowCustomEnabled(true);
|
||||
mActionBar.setCustomView(R.layout.actionbar_custom);
|
||||
|
||||
View customView = mActionBar.getCustomView();
|
||||
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);
|
||||
View customView = mActionBar.getCustomView();
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user