Added nonVisualOrImageBased()

This commit is contained in:
dankito 2021-11-13 15:39:30 +01:00
parent 6d48382a7e
commit 796218c2d6
1 changed files with 6 additions and 0 deletions

View File

@ -54,12 +54,18 @@ open class TanMethodSelector {
}
open fun nonVisualOrImageBased(tanMethods: List<TanMethod>): TanMethod? {
return nonVisual(tanMethods)
?: imageBased(tanMethods)
}
open fun nonVisualOrImageBasedOrFirst(tanMethods: List<TanMethod>): TanMethod? {
return nonVisual(tanMethods)
?: imageBased(tanMethods)
?: first(tanMethods)
}
open fun first(tanMethods: List<TanMethod>): TanMethod? {
return tanMethods.firstOrNull()
}