corrected a bug where a new fragment was added while not needed

This commit is contained in:
Zeapo 2014-08-06 18:23:25 +01:00
parent b1896c4221
commit 17ba2275ec
2 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,6 @@
package com.zeapo.pwdstore; package com.zeapo.pwdstore;
import android.app.ActionBar;
import android.app.Activity; import android.app.Activity;
import android.app.FragmentManager; import android.app.FragmentManager;
import android.app.FragmentTransaction; import android.app.FragmentTransaction;
@ -87,6 +88,11 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI
} }
return true; return true;
case android.R.id.home:
getFragmentManager().popBackStack();
return true;
default: default:
break; break;
} }
@ -105,14 +111,14 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI
} }
private void checkLocalRepository() { private void checkLocalRepository() {
// if we are coming back from gpg do not anything
if (this.leftActivity)
return;
checkLocalRepository(PasswordRepository.getWorkTree()); checkLocalRepository(PasswordRepository.getWorkTree());
} }
private void checkLocalRepository(File localDir) { private void checkLocalRepository(File localDir) {
// if we are coming back from gpg do not anything
if (this.leftActivity)
return;
int status = 0; int status = 0;
FragmentManager fragmentManager = getFragmentManager(); FragmentManager fragmentManager = getFragmentManager();

View File

@ -94,8 +94,6 @@ public class PgpHandler extends Activity {
mServiceConnection.bindToService(); mServiceConnection.bindToService();
ActionBar actionBar = getActionBar(); ActionBar actionBar = getActionBar();
// actionBar.setHomeButtonEnabled(true);
// actionBar.setDisplayShowHomeEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);
} }