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;
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();

View file

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