mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-17 07:30:16 -05:00
Hide the unread message count in the actionbar when doing an explicit search.
This commit is contained in:
parent
4a416f7acd
commit
ed693fc01a
@ -526,11 +526,13 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
|||||||
} else {
|
} else {
|
||||||
mActionBarSubTitle.setText(operation);
|
mActionBarSubTitle.setText(operation);
|
||||||
}
|
}
|
||||||
// query result display
|
|
||||||
} else if (mQueryString != null) {
|
} else if (mQueryString != null) {
|
||||||
|
// query result display. This may be for a search folder as opposed to a user-initiated search.
|
||||||
if (mTitle != null) {
|
if (mTitle != null) {
|
||||||
|
// This was a search folder; the search folder has overridden our title.
|
||||||
mActionBarTitle.setText(mTitle);
|
mActionBarTitle.setText(mTitle);
|
||||||
} else {
|
} else {
|
||||||
|
// This is a search result; set it to the default search result line.
|
||||||
mActionBarTitle.setText(getString(R.string.search_results));
|
mActionBarTitle.setText(getString(R.string.search_results));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -539,8 +541,14 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
|||||||
if (mUnreadMessageCount == 0) {
|
if (mUnreadMessageCount == 0) {
|
||||||
mActionBarUnread.setVisibility(View.GONE);
|
mActionBarUnread.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
mActionBarUnread.setText(Integer.toString(mUnreadMessageCount));
|
if (mQueryString != null && mTitle == null) {
|
||||||
mActionBarUnread.setVisibility(View.VISIBLE);
|
// This is a search result. The unread message count is easily confused
|
||||||
|
// with total number of messages in the search result, so let's hide it.
|
||||||
|
mActionBarUnread.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
mActionBarUnread.setText(Integer.toString(mUnreadMessageCount));
|
||||||
|
mActionBarUnread.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user