aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2015-03-09 21:04:03 +0100
committerVincent Breitmoser <valodim@mugenguild.com>2015-03-09 21:27:32 +0100
commitebf359634139ff2125233a78a976388082abf00c (patch)
treef32f235b3563b1eece4da8c399b75b65cb3f43e9 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
parent159b197930457fc58b251d6a18d2db44a6e30d24 (diff)
downloadopen-keychain-ebf359634139ff2125233a78a976388082abf00c.tar.gz
open-keychain-ebf359634139ff2125233a78a976388082abf00c.tar.bz2
open-keychain-ebf359634139ff2125233a78a976388082abf00c.zip
rearrange linked id layouts, add CertListWidget
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java28
1 files changed, 15 insertions, 13 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
index 59e0efbd0..3edadec2f 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
@@ -839,9 +839,7 @@ public class ViewKeyActivity extends BaseActivity implements
mIsExpired = data.getInt(INDEX_IS_EXPIRED) != 0;
mIsVerified = data.getInt(INDEX_VERIFIED) > 0;
- if (oldFingerprint == null) {
- startFragment(mIsSecret, fpData);
- }
+ startFragment(mIsSecret, fpData);
// get name, email, and comment from USER_ID
String[] mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID));
@@ -1000,21 +998,25 @@ public class ViewKeyActivity extends BaseActivity implements
}
- private void startFragment(boolean isSecret, byte[] fingerprint) {
- // Create an instance of the fragment
- final ViewKeyFragment frag = ViewKeyFragment.newInstance(mDataUri, isSecret, fingerprint);
-
+ private void startFragment(final boolean isSecret, final byte[] fingerprint) {
new Handler().post(new Runnable() {
@Override
public void run() {
FragmentManager manager = getSupportFragmentManager();
- manager.popBackStack("linked_id", FragmentManager.POP_BACK_STACK_INCLUSIVE);
- // Add the fragment to the 'fragment_container' FrameLayout
- // NOTE: We use commitAllowingStateLoss() to prevent weird crashes!
- manager.beginTransaction()
- .replace(R.id.view_key_fragment, frag, "main")
- .commit();
+ if (manager.getBackStackEntryCount() == 0) {
+ // Create an instance of the fragment
+ final ViewKeyFragment frag = ViewKeyFragment.newInstance(
+ mDataUri, isSecret, fingerprint);
+ manager.beginTransaction()
+ .replace(R.id.view_key_fragment, frag)
+ .commit();
+ manager.popBackStack();
+ } else {
+ // not sure yet if we actually want this!
+ // manager.popBackStack();
+ }
+
}
});
}