Improved transactions filtering algorithm in TransactionsFragment, to include the memo when searching with a text query.

This commit is contained in:
Severiano Jaramillo 2019-05-06 13:28:28 -05:00
parent 1528960bed
commit 6df56b068b

View file

@ -110,7 +110,7 @@ class TransactionsViewModel(application: Application) : AndroidViewModel(applica
continue
// Filter by search query
val text = (transaction.from ?: "").toLowerCase() + (transaction.to ?: "").toLowerCase()
val text = "${transaction.from ?: ""} ${transaction.to ?: ""} ${transaction.memo}"
if (text.contains(filterOptions.query, ignoreCase = true)) {
filteredTransactions.add(transaction)
}