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:
parent
2ffa3243b3
commit
3e71453e71
@ -1414,10 +1414,16 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
|
|||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
switch (itemId) {
|
switch (itemId) {
|
||||||
case android.R.id.home: {
|
case android.R.id.home: {
|
||||||
if (mQueryString == null) {
|
if (mIntegrate) {
|
||||||
onShowFolderList();
|
// If we were in one of the integrated mailboxes (think All Mail or Integrated Inbox), then
|
||||||
} else {
|
// go to accounts.
|
||||||
onAccounts();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user