mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Reset search filter
This commit is contained in:
parent
dd7a823552
commit
ad4e7fd810
@ -377,6 +377,17 @@ public class SearchResults extends AppCompatActivity implements FilterDialogFrag
|
||||
}
|
||||
});
|
||||
|
||||
// Reset price filter
|
||||
double max = 0;
|
||||
for (int i = 0; i < resultsProductListSorted.size(); i++){
|
||||
if (resultsProductListSorted.get(i).getPrice().doubleValue() > max) {
|
||||
max = resultsProductListSorted.get(i).getPrice().doubleValue();
|
||||
}
|
||||
}
|
||||
|
||||
this.minPrice = 0;
|
||||
this.maxPrice = max;
|
||||
|
||||
// Apply selected sorting to the list
|
||||
sortResults();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user