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:
parent
26e03137cd
commit
572f8d81ec
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue