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> {
|
open fun searchBanksByNameBankCodeOrCity(query: String?): List<BankInfo> {
|
||||||
if (query == null || query.isEmpty()) {
|
|
||||||
return bankFinder.getBankList()
|
|
||||||
}
|
|
||||||
|
|
||||||
return bankFinder.findBankByNameBankCodeOrCity(query)
|
return bankFinder.findBankByNameBankCodeOrCity(query)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ open class BankFinder {
|
||||||
return getBankList().filter { it.bankCode.startsWith(query) }
|
return getBankList().filter { it.bankCode.startsWith(query) }
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun findBankByNameBankCodeOrCity(query: String): List<BankInfo> {
|
open fun findBankByNameBankCodeOrCity(query: String?): List<BankInfo> {
|
||||||
if (query.isEmpty()) {
|
if (query.isNullOrEmpty()) {
|
||||||
return getBankList()
|
return getBankList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue