Made the navigateUp override behave like a navigate up

This commit is contained in:
Alethea Butler 2014-05-31 12:53:23 -04:00
parent b04fd2337e
commit d67d792409

View file

@ -407,7 +407,15 @@ public class ManageAccountActivity extends XmppActivity {
@Override @Override
public boolean onNavigateUp() { public boolean onNavigateUp() {
if (xmppConnectionService.getConversations().size() == 0) { if (xmppConnectionService.getConversations().size() == 0) {
startActivity(new Intent(this, ContactsActivity.class)); Intent contactsIntent = new Intent(this, ContactsActivity.class);
contactsIntent.setFlags(
// if activity exists in stack, pop the stack and go back to it
Intent.FLAG_ACTIVITY_CLEAR_TOP |
// otherwise, make a new task for it
Intent.FLAG_ACTIVITY_NEW_TASK |
// don't use the new activity animation; finish animation runs instead
Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(contactsIntent);
finish(); finish();
return true; return true;
} else { } else {