Moved check for null or empty to findBankByNameBankCodeOrCity()

This commit is contained in:
dankito 2020-04-22 13:09:50 +02:00
parent 965f2ec460
commit d026244871
2 changed files with 2 additions and 6 deletions

View File

@ -273,10 +273,6 @@ open class BankingPresenter(
}
open fun searchBanksByNameBankCodeOrCity(query: String?): List<BankInfo> {
if (query == null || query.isEmpty()) {
return bankFinder.getBankList()
}
return bankFinder.findBankByNameBankCodeOrCity(query)
}

View File

@ -23,8 +23,8 @@ open class BankFinder {
return getBankList().filter { it.bankCode.startsWith(query) }
}
open fun findBankByNameBankCodeOrCity(query: String): List<BankInfo> {
if (query.isEmpty()) {
open fun findBankByNameBankCodeOrCity(query: String?): List<BankInfo> {
if (query.isNullOrEmpty()) {
return getBankList()
}