Moved check for null or empty to findBankByNameBankCodeOrCity()
This commit is contained in:
parent
965f2ec460
commit
d026244871
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue