1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-26 09:38:52 -05:00

Make the icon up navigation work in messagelist when displaying a query, tapping it takes you back to the account screen.

This commit is contained in:
Sander Bogaert 2012-08-02 10:14:16 -04:00 committed by Andrew Chen
parent 6daa8a3c0c
commit f530af7f8b

View File

@ -673,7 +673,7 @@ public class MessageList extends K9ListActivity implements
mInflater = getLayoutInflater();
mActionBar = getSupportActionBar();
if (mQueryString == null) initializeActionBar();
initializeActionBar();
initializeLayout();
// Only set "touchable" when we're first starting up the activity.
@ -905,11 +905,14 @@ public class MessageList extends K9ListActivity implements
}
private void initializeActionBar() {
if (mQueryString == null) {
mActionBar.setDisplayShowTitleEnabled(false);
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
mNavigationSpinner = ActionBarNavigationSpinner.getDefaultSpinner(this);
mActionBar.setListNavigationCallbacks(mNavigationSpinner, this);
}
mActionBar.setDisplayHomeAsUpEnabled(true);
mActionBar.setDisplayShowTitleEnabled(false);
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
mNavigationSpinner = ActionBarNavigationSpinner.getDefaultSpinner(this);
mActionBar.setListNavigationCallbacks(mNavigationSpinner, this);
}
private void initializeLayout() {
@ -1448,7 +1451,11 @@ public class MessageList extends K9ListActivity implements
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home: {
onShowFolderList();
if (mQueryString == null) {
onShowFolderList();
} else {
onAccounts();
}
return true;
}
case R.id.compose: {