Fixed filtering chipTAN USB (as e.g. "Smart-TAN plus optisch / USB" should be displayed of course
This commit is contained in:
parent
532515badd
commit
0e0d553c0b
|
@ -91,14 +91,14 @@ open class EnterTanDialog : DialogFragment() {
|
|||
|
||||
protected open fun setupSelectTanProcedureView(rootView: View) {
|
||||
val adapter = TanProceduresAdapter()
|
||||
val tanProceduresWithoutUnsupported = account.supportedTanProcedures.filterNot { it.displayName.contains("usb", true) } // USB tan generators are not supported on Android
|
||||
val tanProceduresWithoutUnsupported = account.supportedTanProcedures.filterNot { it.type == TanProcedureType.ChipTanUsb } // USB tan generators are not supported on Android
|
||||
adapter.setItems(tanProceduresWithoutUnsupported)
|
||||
|
||||
rootView.findViewById<Spinner>(R.id.spnTanProcedures)?.let { spinner ->
|
||||
spinner.adapter = adapter
|
||||
|
||||
val selectedTanProcedure = account.selectedTanProcedure
|
||||
?: tanProceduresWithoutUnsupported.filter { it.displayName.contains("manuell") == false && it.displayName.contains("usb") == false }.firstOrNull()
|
||||
?: tanProceduresWithoutUnsupported.firstOrNull { it.type != TanProcedureType.ChipTanManuell && it.type != TanProcedureType.ChipTanUsb }
|
||||
?: tanProceduresWithoutUnsupported.firstOrNull()
|
||||
selectedTanProcedure?.let { spinner.setSelection(adapter.getItems().indexOf(selectedTanProcedure)) }
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ open class EnterTanDialog(
|
|||
protected val dialogService = JavaFxDialogService()
|
||||
|
||||
|
||||
protected val tanProceduresWithoutUnsupported = account.supportedTanProcedures.filterNot { it.displayName.contains("usb", true) } // USB tan generators are not supported
|
||||
protected val tanProceduresWithoutUnsupported = account.supportedTanProcedures.filterNot { it.type == TanProcedureType.ChipTanUsb } // USB tan generators are not supported
|
||||
|
||||
protected val selectedTanProcedure = SimpleObjectProperty<TanProcedure>(account.selectedTanProcedure ?: tanProceduresWithoutUnsupported.firstOrNull { it.displayName.contains("manuell", true) == false } ?: tanProceduresWithoutUnsupported.firstOrNull())
|
||||
|
||||
|
|
Loading…
Reference in New Issue