Made the navigateUp override behave like a navigate up
This commit is contained in:
parent
b04fd2337e
commit
d67d792409
|
@ -407,7 +407,15 @@ public class ManageAccountActivity extends XmppActivity {
|
|||
@Override
|
||||
public boolean onNavigateUp() {
|
||||
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();
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue