mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 22:05:19 +00:00
Fix GitAsyncTask activity handling in error case (#818)
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user