From fbafbb62e347c3988f473dcb3e10a38466c40aec Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 9 Sep 2024 17:06:29 +0200 Subject: [PATCH] Added option closeDialogs --- .../net/codinux/banking/fints/config/FinTsClientOptions.kt | 3 +++ .../kotlin/net/codinux/banking/fints/model/JobContext.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/config/FinTsClientOptions.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/config/FinTsClientOptions.kt index 371ed41b..0a8feb60 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/config/FinTsClientOptions.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/config/FinTsClientOptions.kt @@ -26,6 +26,9 @@ data class FinTsClientOptions( * Defaults to true. */ val removeSensitiveDataFromMessageLog: Boolean = true, + + val closeDialogs: Boolean = true, + val version: String = "1.0.0", // TODO: get version dynamically val productName: String = "15E53C26816138699C7B6A3E8" ) { diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/JobContext.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/JobContext.kt index 0a4dc5b1..b3b67103 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/JobContext.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/JobContext.kt @@ -55,7 +55,7 @@ open class JobContext( protected open var dialogNumber: Int = 0 - open fun startNewDialog(closeDialog: Boolean = true, dialogId: String = DialogContext.InitialDialogId, + open fun startNewDialog(closeDialog: Boolean = config.options.closeDialogs, dialogId: String = DialogContext.InitialDialogId, versionOfSecurityProcedure: VersionDesSicherheitsverfahrens = VersionDesSicherheitsverfahrens.Version_2, chunkedResponseHandler: ((BankResponse) -> Unit)? = dialog.chunkedResponseHandler) : DialogContext {