aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src/main/java/org/sufficientlysecure
diff options
context:
space:
mode:
authorAshley Hughes <spirit.returned@gmail.com>2014-02-08 15:59:44 +0000
committerAshley Hughes <spirit.returned@gmail.com>2014-02-08 15:59:44 +0000
commit5def251e62d383f023c62fea1734977e11b0fa27 (patch)
tree8f7872d7cb439b9cc331bce93af40ecf51873063 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure
parent44ee7137632c2fd8e6d97a8f05a213467ecf1dc6 (diff)
downloadopen-keychain-5def251e62d383f023c62fea1734977e11b0fa27.tar.gz
open-keychain-5def251e62d383f023c62fea1734977e11b0fa27.tar.bz2
open-keychain-5def251e62d383f023c62fea1734977e11b0fa27.zip
keep track of brand new keys, they need saving
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure')
-rw-r--r--OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
index 802d29a44..9ddfadef1 100644
--- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
+++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java
@@ -100,6 +100,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
private String mSavedNewPassPhrase = null;
private boolean mIsPassPhraseSet;
private boolean mNeedsSaving;
+ private boolean mIsBrandNewKeyring = false;
private MenuItem mSaveButton;
private BootstrapButton mChangePassPhrase;
@@ -118,6 +119,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
mNeedsSaving = (mUserIdsView == null) ? false : mUserIdsView.needsSaving();
mNeedsSaving |= (mKeysView == null) ? false : mKeysView.needsSaving();
mNeedsSaving |= hasPassphraseChanged();
+ mNeedsSaving |= mIsBrandNewKeyring;
return mNeedsSaving;
}
@@ -171,6 +173,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
Bundle extras = intent.getExtras();
mCurrentPassPhrase = "";
+ mIsBrandNewKeyring = true;
if (extras != null) {
// if userId is given, prefill the fields
@@ -616,7 +619,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
}
private void cancelClicked() {
- if (mNeedsSaving) { //ask if we want to save
+ if (needsSaving()) { //ask if we want to save
AlertDialog.Builder alert = new AlertDialog.Builder(
EditKeyActivity.this);