summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-03-13 03:05:03 +0530
committerGitHub <noreply@github.com>2021-03-13 03:05:03 +0530
commit197af98bb541b12eb24b1c0e3c8976763114e647 (patch)
tree5aa4bf986bb9c1e428a8060de19b58a97626cf67 /app/src/main
parent6206850eb298f554b7ce9a1cd9adb6a392ff1e54 (diff)
Append trailing newline to `.gpg-id` during creation (#1344)
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt2
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/onboarding/fragments/KeySelectionFragment.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt
index dfde4845..17b99935 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/PasswordCreationActivity.kt
@@ -105,7 +105,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
lifecycleScope.launch {
val gpgIdentifierFile = File(PasswordRepository.getRepositoryDirectory(), ".gpg-id")
withContext(Dispatchers.IO) {
- gpgIdentifierFile.writeText(keyIds.joinToString("\n"))
+ gpgIdentifierFile.writeText((keyIds + "").joinToString("\n"))
}
commitChange(getString(
R.string.git_commit_gpg_id,
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/onboarding/fragments/KeySelectionFragment.kt b/app/src/main/java/dev/msfjarvis/aps/ui/onboarding/fragments/KeySelectionFragment.kt
index 6ba73aef..44e533cb 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/onboarding/fragments/KeySelectionFragment.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/onboarding/fragments/KeySelectionFragment.kt
@@ -39,7 +39,7 @@ class KeySelectionFragment : Fragment(R.layout.fragment_key_selection) {
lifecycleScope.launch {
withContext(Dispatchers.IO) {
val gpgIdentifierFile = File(PasswordRepository.getRepositoryDirectory(), ".gpg-id")
- gpgIdentifierFile.writeText(keyIds.joinToString("\n"))
+ gpgIdentifierFile.writeText((keyIds + "").joinToString("\n"))
}
settings.edit { putBoolean(PreferenceKeys.REPOSITORY_INITIALIZED, true) }
requireActivity().commitChange(getString(