aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt7
1 files changed, 6 insertions, 1 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 be18472d..63e916d7 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
@@ -161,7 +161,6 @@ 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 or is meant to generate
// a password, we allow the user to edit the path, otherwise we style the
// EditText like a TextView.
@@ -170,6 +169,12 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
} else {
setBackgroundColor(getColor(android.R.color.transparent))
}
+ val path = getRelativePath(fullPath, repoPath)
+ // Keep empty path field visible if it is editable.
+ if (path.isEmpty() && !isEnabled)
+ visibility = View.GONE
+ else
+ setText(path)
}
suggestedName?.let { crypto_password_file_edit.setText(it) }
// Allow the user to quickly switch between storing the username as the filename or