fix NPE
This commit is contained in:
parent
87ab4fda0e
commit
ed30e2bf10
1 changed files with 2 additions and 2 deletions
|
@ -200,8 +200,8 @@ class FoodFragment : DaggerFragment() {
|
|||
|
||||
private fun filterData() {
|
||||
val textFilter = binding.filter.text.toString()
|
||||
val categoryFilter = binding.category.selectedItem.toString()
|
||||
val subcategoryFilter = binding.subcategory.selectedItem.toString()
|
||||
val categoryFilter = binding.category.selectedItem?.toString() ?: resourceHelper.gs(R.string.none)
|
||||
val subcategoryFilter = binding.subcategory.selectedItem?.toString() ?: resourceHelper.gs(R.string.none)
|
||||
val newFiltered = ArrayList<Food>()
|
||||
for (f in unfiltered) {
|
||||
if (f.category == null || f.subCategory == null) continue
|
||||
|
|
Loading…
Reference in a new issue