Prevent racing double commits on password creation (#1047)

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Fabian Henneke 2020-08-23 18:51:36 +02:00 committed by GitHub
parent 06497f1db0
commit 2c8999c1bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Password creation UI will scroll if it does not fit on the screen
- Saving a password after creating it fails to finish commit operation
## [1.11.1] - 2020-08-21

View file

@ -440,6 +440,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
returnIntent.putExtra(RETURN_EXTRA_USERNAME, username)
}
if (editing) {
lifecycleScope.launch {
commitChange(
getString(
@ -448,6 +449,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
)
)
}
}
if (directoryInputLayout.isVisible && directoryInputLayout.isEnabled && oldFileName != null) {
val oldFile = File("$repoPath/${oldCategory?.trim('/')}/$oldFileName.gpg")