aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wong <wongma@protonmail.ch>2015-07-10 20:13:54 -0400
committerMatthew Wong <wongma@protonmail.ch>2015-07-10 20:13:54 -0400
commit9b61c6991347e10606051b6d790b8d9e52dc3ba7 (patch)
tree979046e66989eab15714e24db8d13ef2788c7c8b
parent6c8fe2ed4523c1931726263ea66325d9fb92fdeb (diff)
Append password from dialog, not a newly generated one
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java b/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java
index fced4c1c..12822b3f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java
@@ -61,9 +61,9 @@ public class pwgenDialogFragment extends DialogFragment {
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- setPreferences();
- TextView textView = (TextView) getActivity().findViewById(R.id.crypto_password_edit);
- textView.append(pwgen.generate(getActivity().getApplicationContext()).get(0));
+ TextView edit = (TextView) getActivity().findViewById(R.id.crypto_password_edit);
+ TextView generate = (TextView) getDialog().findViewById(R.id.passwordText);
+ edit.append(generate.getText());
}
});