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/git/GitAsyncTask.kt10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt
index 631bbf88..0b4caadf 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt
@@ -131,6 +131,10 @@ class GitAsyncTask(
is Result.Err -> {
e(result.err)
operation.onError(rootCauseException(result.err))
+ if (finishWithResultOnEnd != null) {
+ activity?.setResult(Activity.RESULT_CANCELED)
+ activity?.finish()
+ }
}
is Result.Ok -> {
operation.onSuccess()
@@ -138,11 +142,11 @@ class GitAsyncTask(
activity?.setResult(Activity.RESULT_OK, finishWithResultOnEnd)
activity?.finish()
}
- if (refreshListOnEnd) {
- (activity as? PasswordStore)?.resetPasswordList()
- }
}
}
+ if (refreshListOnEnd) {
+ (activity as? PasswordStore)?.resetPasswordList()
+ }
}
}