mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-13 06:38:05 -05:00
Pressing the actionbar icon will take you back to the accountsscreen.
This commit is contained in:
parent
67b4cd9c8e
commit
ee6bd2dc22
@ -309,6 +309,13 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void listAccountsClearTop(Context context) {
|
||||
Intent intent = new Intent(context, Accounts.class);
|
||||
intent.putExtra(EXTRA_STARTUP, false);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewIntent(Intent intent) {
|
||||
Uri uri = intent.getData();
|
||||
|
@ -556,6 +556,12 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
||||
|
||||
@Override public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Accounts.listAccountsClearTop(this);
|
||||
finish();
|
||||
|
||||
return true;
|
||||
|
||||
case R.id.compose:
|
||||
MessageCompose.actionCompose(this, mAccount);
|
||||
|
||||
|
@ -1500,6 +1500,12 @@ public class MessageList
|
||||
final List<MessageInfoHolder> selection = getSelectionFromCheckboxes();
|
||||
int itemId = item.getItemId();
|
||||
switch (itemId) {
|
||||
case android.R.id.home: {
|
||||
// app icon in action bar clicked; go home
|
||||
Accounts.listAccountsClearTop(this);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
case R.id.compose: {
|
||||
onCompose();
|
||||
return true;
|
||||
|
@ -852,6 +852,10 @@ public class MessageView extends K9Activity implements OnClickListener {
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
Accounts.listAccountsClearTop(this);
|
||||
finish();
|
||||
break;
|
||||
case R.id.delete:
|
||||
onDelete();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user