mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 11:35:07 -05:00
Button Text changes to Change Passphrase if Passphrase is set
This commit is contained in:
parent
efab1d27ac
commit
f34b3ee531
@ -368,9 +368,8 @@ public class EditKeyActivity extends ActionBarActivity {
|
||||
}
|
||||
|
||||
mCurrentPassphrase = "";
|
||||
|
||||
buildLayout();
|
||||
mIsPassPhraseSet = PassphraseCacheService.hasPassphrase(this, masterKeyId);
|
||||
buildLayout();
|
||||
if (!mIsPassPhraseSet) {
|
||||
// check "no passphrase" checkbox and remove button
|
||||
mNoPassphrase.setChecked(true);
|
||||
@ -425,11 +424,14 @@ public class EditKeyActivity extends ActionBarActivity {
|
||||
// find views
|
||||
mChangePassphrase = (BootstrapButton) findViewById(R.id.edit_key_btn_change_passphrase);
|
||||
mNoPassphrase = (CheckBox) findViewById(R.id.edit_key_no_passphrase);
|
||||
|
||||
// Build layout based on given userIds and keys
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
LinearLayout container = (LinearLayout) findViewById(R.id.edit_key_container);
|
||||
if(mIsPassPhraseSet){
|
||||
mChangePassphrase.setText(getString(R.string.btn_change_passphrase));
|
||||
}
|
||||
mUserIdsView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false);
|
||||
mUserIdsView.setType(Id.type.user_id);
|
||||
mUserIdsView.setCanEdit(mMasterCanSign);
|
||||
|
Loading…
Reference in New Issue
Block a user