aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
index 45269145..8c5aa3ae 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
@@ -839,7 +839,13 @@ class PasswordStore : AppCompatActivity() {
private const val PREFERENCE_SEEN_AUTOFILL_ONBOARDING = "seen_autofill_onboarding"
fun commitChange(activity: Activity, message: String, finishWithResultOnEnd: Intent? = null) {
- if (!PasswordRepository.isGitRepo()) return
+ if (!PasswordRepository.isGitRepo()) {
+ if (finishWithResultOnEnd != null) {
+ activity.setResult(Activity.RESULT_OK, finishWithResultOnEnd)
+ activity.finish()
+ }
+ return
+ }
object : GitOperation(getRepositoryDirectory(activity), activity) {
override fun execute() {
tag(TAG).d { "Committing with message $message" }