aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlethea Butler <alethea@alethea.io>2014-05-31 11:50:09 -0400
committerAlethea Butler <alethea@alethea.io>2014-05-31 11:50:09 -0400
commitb04fd2337ef1e37309f634f41b0d07f16f4e64ab (patch)
treef49d0c63bb84c2a084b82ee66bcb9f4b13eaf0b0 /src
parent04977aedc4e05f095abf1764b70949f5ab1794c7 (diff)
Refactored into onNavigateUp
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/ui/ManageAccountActivity.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
index 6fd87473..c61c1b82 100644
--- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -398,18 +398,23 @@ public class ManageAccountActivity extends XmppActivity {
case R.id.action_add_account:
addAccount();
break;
- case android.R.id.home:
- if (xmppConnectionService.getConversations().size() == 0) {
- startActivity(new Intent(getApplicationContext(),
- ContactsActivity.class));
- }
- break;
default:
break;
}
return super.onOptionsItemSelected(item);
}
+ @Override
+ public boolean onNavigateUp() {
+ if (xmppConnectionService.getConversations().size() == 0) {
+ startActivity(new Intent(this, ContactsActivity.class));
+ finish();
+ return true;
+ } else {
+ return super.onNavigateUp();
+ }
+ }
+
private void editAccount(Account account) {
EditAccount dialog = new EditAccount();
dialog.setAccount(account);