From 17ba2275ec41432d2999f9dc075299f44cacde7c Mon Sep 17 00:00:00 2001 From: Zeapo Date: Wed, 6 Aug 2014 18:23:25 +0100 Subject: corrected a bug where a new fragment was added while not needed --- app/src/main/java/com/zeapo/pwdstore/PasswordStore.java | 14 ++++++++++---- .../main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 2 -- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java index c207f382..890a76bc 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java @@ -1,5 +1,6 @@ package com.zeapo.pwdstore; +import android.app.ActionBar; import android.app.Activity; import android.app.FragmentManager; import android.app.FragmentTransaction; @@ -87,6 +88,11 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI } return true; + + case android.R.id.home: + getFragmentManager().popBackStack(); + return true; + default: break; } @@ -105,14 +111,14 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI } private void checkLocalRepository() { - // if we are coming back from gpg do not anything - if (this.leftActivity) - return; - checkLocalRepository(PasswordRepository.getWorkTree()); } private void checkLocalRepository(File localDir) { + // if we are coming back from gpg do not anything + if (this.leftActivity) + return; + int status = 0; FragmentManager fragmentManager = getFragmentManager(); diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 9e44cdf2..fec575ac 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -94,8 +94,6 @@ public class PgpHandler extends Activity { mServiceConnection.bindToService(); ActionBar actionBar = getActionBar(); -// actionBar.setHomeButtonEnabled(true); -// actionBar.setDisplayShowHomeEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); } -- cgit v1.2.3