mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-12 13:10:16 -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 {
|
class AccountsHandler extends Handler {
|
||||||
private void setViewTitle() {
|
private void setViewTitle() {
|
||||||
mActionBarTitle.setText(" " + getString(R.string.accounts_title));
|
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());
|
String operation = mListener.getOperation(Accounts.this, getTimeFormat());
|
||||||
operation.trim();
|
operation.trim();
|
||||||
|
@ -119,7 +119,13 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
mActionBarTitle.setText(getString(R.string.folders_title));
|
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();
|
String operation = mAdapter.mListener.getOperation(FolderList.this, getTimeFormat()).trim();
|
||||||
if (operation.length() < 1) {
|
if (operation.length() < 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user