mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-13 22:58:03 -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);
|
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
|
@Override
|
||||||
public void onNewIntent(Intent intent) {
|
public void onNewIntent(Intent intent) {
|
||||||
Uri uri = intent.getData();
|
Uri uri = intent.getData();
|
||||||
|
@ -556,6 +556,12 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||||||
|
|
||||||
@Override public boolean onOptionsItemSelected(MenuItem item) {
|
@Override public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
case android.R.id.home:
|
||||||
|
Accounts.listAccountsClearTop(this);
|
||||||
|
finish();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
case R.id.compose:
|
case R.id.compose:
|
||||||
MessageCompose.actionCompose(this, mAccount);
|
MessageCompose.actionCompose(this, mAccount);
|
||||||
|
|
||||||
|
@ -1500,6 +1500,12 @@ public class MessageList
|
|||||||
final List<MessageInfoHolder> selection = getSelectionFromCheckboxes();
|
final List<MessageInfoHolder> selection = getSelectionFromCheckboxes();
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
switch (itemId) {
|
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: {
|
case R.id.compose: {
|
||||||
onCompose();
|
onCompose();
|
||||||
return true;
|
return true;
|
||||||
|
@ -852,6 +852,10 @@ public class MessageView extends K9Activity implements OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
case android.R.id.home:
|
||||||
|
Accounts.listAccountsClearTop(this);
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
case R.id.delete:
|
case R.id.delete:
|
||||||
onDelete();
|
onDelete();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user