Implemented to not close dialogs when adding a new account to speed things up a bit
This commit is contained in:
parent
124b3ca9f6
commit
0e9097f8cc
|
@ -56,6 +56,8 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
|
||||
open var areWeThatGentleToCloseDialogs: Boolean = true
|
||||
|
||||
protected val messageLogField = CopyOnWriteArrayList<MessageLogEntry>()
|
||||
|
||||
open val messageLog: List<MessageLogEntry>
|
||||
|
@ -99,7 +101,8 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
|
||||
protected open fun closeAnonymousDialog(dialogContext: DialogContext, response: Response) {
|
||||
|
||||
if (dialogContext.didBankCloseDialog) { // bank already closed dialog -> there's no need to send dialog end message
|
||||
// bank already closed dialog -> there's no need to send dialog end message
|
||||
if (areWeThatGentleToCloseDialogs == false || dialogContext.didBankCloseDialog) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -170,6 +173,9 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
|
||||
open fun addAccount(bank: BankData, customer: CustomerData): AddAccountResponse {
|
||||
|
||||
val originalAreWeThatGentleToCloseDialogs = areWeThatGentleToCloseDialogs
|
||||
areWeThatGentleToCloseDialogs = false
|
||||
|
||||
/* First dialog: Get user's basic data like her TAN procedures */
|
||||
|
||||
val newUserInfoResponse = getBankAndCustomerInfoForNewUser(bank, customer)
|
||||
|
@ -220,6 +226,8 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
customer.resetSelectedTanProcedure()
|
||||
}
|
||||
|
||||
areWeThatGentleToCloseDialogs = originalAreWeThatGentleToCloseDialogs
|
||||
|
||||
val supportsRetrievingTransactionsOfLast90DaysWithoutTan = transactionsOfLast90DaysResponses.firstOrNull { it.isSuccessful } != null
|
||||
val unbookedTransactions = transactionsOfLast90DaysResponses.flatMap { it.unbookedTransactions }
|
||||
val bookedTransactions = transactionsOfLast90DaysResponses.flatMap { it.bookedTransactions }
|
||||
|
@ -486,7 +494,8 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
|
||||
protected open fun closeDialog(dialogContext: DialogContext) {
|
||||
|
||||
if (dialogContext.didBankCloseDialog) { // bank already closed dialog -> there's no need to send dialog end message
|
||||
// bank already closed dialog -> there's no need to send dialog end message
|
||||
if (areWeThatGentleToCloseDialogs == false || dialogContext.didBankCloseDialog) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue