aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-04-06 08:02:06 +0200
committerGitHub <noreply@github.com>2020-04-06 08:02:06 +0200
commit6a54404462e3152dd15444fd6ce8cde1013e2c98 (patch)
tree89c58f2e5dd30625768e3d98ca9beb7ab46ec73a /app
parent4e8f5e0f691829738c5c4fbf50617a62ccbb97a8 (diff)
Fix: Make path editable when generating a password (#688)
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
index 013a98b0..1b5da928 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
@@ -161,9 +161,10 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
title = getString(R.string.new_password_title)
crypto_password_category.apply {
setText(getRelativePath(fullPath, repoPath))
- // If the activity has been provided with suggested info, we allow the user to
- // edit the path, otherwise we style the EditText like a TextView.
- if (suggestedName != null || suggestedPass != null) {
+ // If the activity has been provided with suggested info or is meant to generate
+ // a password, we allow the user to edit the path, otherwise we style the
+ // EditText like a TextView.
+ if (suggestedName != null || suggestedPass != null || shouldGeneratePassword) {
isEnabled = true
} else {
setBackgroundColor(getColor(android.R.color.transparent))