Prevent racing double commits on password creation (#1047)

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit 2c8999c1bf)
This commit is contained in:
Fabian Henneke
2020-08-23 18:51:36 +02:00
committed by Harsh Shandilya
parent c4588b9dbf
commit a29414fce6
2 changed files with 12 additions and 6 deletions

View File

@@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file.
## [1.11.2] - 2020-08-24 ## [1.11.2] - 2020-08-24
### Fixed
- Saving a password after creating it fails to finish commit operation
## [1.11.1] - 2020-08-21 ## [1.11.1] - 2020-08-21
### Fixed ### Fixed

View File

@@ -426,13 +426,15 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
returnIntent.putExtra(RETURN_EXTRA_USERNAME, username) returnIntent.putExtra(RETURN_EXTRA_USERNAME, username)
} }
lifecycleScope.launch { if (editing) {
commitChange( lifecycleScope.launch {
getString( commitChange(
R.string.git_commit_edit_text, getString(
getLongName(fullPath, repoPath, editName) R.string.git_commit_edit_text,
getLongName(fullPath, repoPath, editName)
)
) )
) }
} }
if (directoryInputLayout.isVisible && directoryInputLayout.isEnabled && oldFileName != null) { if (directoryInputLayout.isVisible && directoryInputLayout.isEnabled && oldFileName != null) {