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_width="0dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -521,20 +521,22 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
|||||||
mActionBarTitle.setText(displayName);
|
mActionBarTitle.setText(displayName);
|
||||||
mActionBarSubTitle.setText(mAccount.getEmail());
|
mActionBarSubTitle.setText(mAccount.getEmail());
|
||||||
|
|
||||||
if (mUnreadMessageCount == 0) {
|
|
||||||
mActionBarUnread.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
mActionBarUnread.setText(Integer.toString(mUnreadMessageCount));
|
|
||||||
mActionBarUnread.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
// query result display
|
// query result display
|
||||||
} else if (mQueryString != null) {
|
} else if (mQueryString != null) {
|
||||||
if (mTitle != null) {
|
if (mTitle != null) {
|
||||||
setTitle(mTitle);
|
mActionBarTitle.setText(mTitle);
|
||||||
} else {
|
} 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) {
|
private void progress(final boolean progress) {
|
||||||
@ -907,14 +909,16 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeActionBar() {
|
private void initializeActionBar() {
|
||||||
if (mQueryString == null) {
|
mActionBar.setDisplayShowCustomEnabled(true);
|
||||||
mActionBar.setDisplayShowCustomEnabled(true);
|
mActionBar.setCustomView(R.layout.actionbar_custom);
|
||||||
mActionBar.setCustomView(R.layout.actionbar_custom);
|
|
||||||
|
|
||||||
View customView = mActionBar.getCustomView();
|
View customView = mActionBar.getCustomView();
|
||||||
mActionBarTitle = (TextView) customView.findViewById(R.id.actionbar_title_first);
|
mActionBarTitle = (TextView) customView.findViewById(R.id.actionbar_title_first);
|
||||||
mActionBarSubTitle = (TextView) customView.findViewById(R.id.actionbar_title_sub);
|
mActionBarSubTitle = (TextView) customView.findViewById(R.id.actionbar_title_sub);
|
||||||
mActionBarUnread = (TextView) customView.findViewById(R.id.actionbar_unread_count);
|
mActionBarUnread = (TextView) customView.findViewById(R.id.actionbar_unread_count);
|
||||||
|
|
||||||
|
if (mQueryString != null) {
|
||||||
|
mActionBarSubTitle.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
mActionBar.setDisplayHomeAsUpEnabled(true);
|
mActionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user