mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-15 05:55:06 -05:00
Don't display "0" in the action bar if there are no unread messages
This commit is contained in:
parent
ac8d1aa162
commit
3060fd063e
@ -150,7 +150,13 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
||||
class AccountsHandler extends Handler {
|
||||
private void setViewTitle() {
|
||||
mActionBarTitle.setText(" " + getString(R.string.accounts_title));
|
||||
mActionBarUnread.setText(String.valueOf(mUnreadMessageCount));
|
||||
|
||||
if (mUnreadMessageCount == 0) {
|
||||
mActionBarUnread.setVisibility(View.GONE);
|
||||
} else {
|
||||
mActionBarUnread.setText(Integer.toString(mUnreadMessageCount));
|
||||
mActionBarUnread.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String operation = mListener.getOperation(Accounts.this, getTimeFormat());
|
||||
operation.trim();
|
||||
|
@ -119,7 +119,13 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
mActionBarTitle.setText(getString(R.string.folders_title));
|
||||
mActionBarUnread.setText(String.valueOf(mUnreadMessageCount));
|
||||
|
||||
if (mUnreadMessageCount == 0) {
|
||||
mActionBarUnread.setVisibility(View.GONE);
|
||||
} else {
|
||||
mActionBarUnread.setText(Integer.toString(mUnreadMessageCount));
|
||||
mActionBarUnread.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
String operation = mAdapter.mListener.getOperation(FolderList.this, getTimeFormat()).trim();
|
||||
if (operation.length() < 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user