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 val mapper = net.dankito.banking.mapper.fints4kModelMapper(modelCreator)
|
||||||
|
|
||||||
protected var didTryToGetAccountDataFromBank = false
|
|
||||||
|
|
||||||
|
|
||||||
protected val fintsBank = restoreDataOrMapFromUiModel(bank)
|
protected val fintsBank = restoreDataOrMapFromUiModel(bank)
|
||||||
|
|
||||||
|
@ -157,16 +155,15 @@ open class fints4kBankingClient(
|
||||||
if (mappedAccount != null) {
|
if (mappedAccount != null) {
|
||||||
findAccountResult(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 ->
|
addAccountAsync { response ->
|
||||||
didTryToGetAccountDataFromBank = !!! response.successful
|
if (response.successful) {
|
||||||
|
findAccountResult(mapper.findMatchingAccount(fintsBank, account), response.errorToShowToUser)
|
||||||
findAccountResult(mapper.findMatchingAccount(fintsBank, account),
|
|
||||||
response.errorToShowToUser)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
findAccountResult(null, "Cannot find account for ${account.identifier}") // TODO: translate
|
findAccountResult(null, response.errorToShowToUser)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue