1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-30 23:00:09 -05:00

Handle implicit vs. explicit searches in ActionBar home button behavior.

This commit is contained in:
Andrew Chen 2012-09-14 19:45:04 -07:00
parent 2ffa3243b3
commit 3e71453e71

View File

@ -1414,10 +1414,16 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home: {
if (mQueryString == null) {
onShowFolderList();
} else {
if (mIntegrate) {
// If we were in one of the integrated mailboxes (think All Mail or Integrated Inbox), then
// go to accounts.
onAccounts();
} else if (mQueryString != null) {
// We did a search of some sort. Go back to wherever the user searched from.
onBackPressed();
} else {
// In a standard message list of a folder. Go to folder list.
onShowFolderList();
}
return true;
}