From d67d792409d2f7ab990be2f698c8e00bf7e787b9 Mon Sep 17 00:00:00 2001 From: Alethea Butler Date: Sat, 31 May 2014 12:53:23 -0400 Subject: [PATCH] Made the navigateUp override behave like a navigate up --- .../siacs/conversations/ui/ManageAccountActivity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index c61c1b82c..8a26d9078 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -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 {