Fix GitAsyncTask activity handling in error case (#818)
This commit is contained in:
parent
cd0b23e003
commit
81c4960dd6
1 changed files with 7 additions and 3 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue