Added selectedTanMedium

This commit is contained in:
dankito 2021-11-01 19:14:39 +01:00
parent a9e8e2e96c
commit 4ec82a44d7
3 changed files with 5 additions and 1 deletions

View File

@ -332,6 +332,9 @@ open class FinTsJobExecutor(
tanMediaList?.let { tanMediaList?.let {
bank.tanMedia = it.tanMedia bank.tanMedia = it.tanMedia
bank.selectedTanMedium = bank.selectedTanMedium?.let { selected -> bank.tanMedia.firstOrNull { it.mediumName == selected.mediumName } } // try to find selectedTanMedium in new TanMedia instances
?: bank.tanMedia.firstOrNull { it.mediumName != null }
} }
callback(GetTanMediaListResponse(response, tanMediaList)) callback(GetTanMediaListResponse(response, tanMediaList))

View File

@ -525,7 +525,7 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg
val bank = dialogContext.bank val bank = dialogContext.bank
if (bank.isTanMethodSelected && bank.selectedTanMethod.nameOfTanMediumRequired) { if (bank.isTanMethodSelected && bank.selectedTanMethod.nameOfTanMediumRequired) {
return bank.tanMedia.firstOrNull { it.mediumName != null }?.mediumName return bank.selectedTanMedium?.mediumName
} }
return null return null

View File

@ -28,6 +28,7 @@ open class BankData(
open var tanMethodsAvailableForUser: List<TanMethod> = listOf(), open var tanMethodsAvailableForUser: List<TanMethod> = listOf(),
open var selectedTanMethod: TanMethod = TanMethodNotSelected, open var selectedTanMethod: TanMethod = TanMethodNotSelected,
open var tanMedia: List<TanMedium> = listOf(), open var tanMedia: List<TanMedium> = listOf(),
open var selectedTanMedium: TanMedium? = null,
open var changeTanMediumParameters: ChangeTanMediaParameters? = null, open var changeTanMediumParameters: ChangeTanMediaParameters? = null,
open var pinInfo: PinInfo? = null, open var pinInfo: PinInfo? = null,