Removed as e.g. when on first attempt there's no network connection, then no further attempt would be taken during whole lifetime of app

This commit is contained in:
dankito 2020-09-30 02:43:12 +02:00
parent 26e03137cd
commit 572f8d81ec
1 changed files with 7 additions and 10 deletions

View File

@ -46,8 +46,6 @@ open class fints4kBankingClient(
protected val mapper = net.dankito.banking.mapper.fints4kModelMapper(modelCreator)
protected var didTryToGetAccountDataFromBank = false
protected val fintsBank = restoreDataOrMapFromUiModel(bank)
@ -157,17 +155,16 @@ open class fints4kBankingClient(
if (mappedAccount != null) {
findAccountResult(mappedAccount, null)
}
else if (didTryToGetAccountDataFromBank == false) { // then try to get account data by fetching data from bank
else { // then try to get account data by fetching data from bank
addAccountAsync { response ->
didTryToGetAccountDataFromBank = !!! response.successful
findAccountResult(mapper.findMatchingAccount(fintsBank, account),
response.errorToShowToUser)
if (response.successful) {
findAccountResult(mapper.findMatchingAccount(fintsBank, account), response.errorToShowToUser)
}
else {
findAccountResult(null, response.errorToShowToUser)
}
}
}
else {
findAccountResult(null, "Cannot find account for ${account.identifier}") // TODO: translate
}
}