mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
NearbyFilterSearchRecyclerViewAdapter.java: Changed toUpperCase to toUpperCase(Locale.ROOT)
This commit is contained in:
parent
5caeb82478
commit
34cf173030
1 changed files with 3 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import fr.free.nrw.commons.R;
|
import fr.free.nrw.commons.R;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class NearbyFilterSearchRecyclerViewAdapter
|
public class NearbyFilterSearchRecyclerViewAdapter
|
||||||
extends RecyclerView.Adapter<NearbyFilterSearchRecyclerViewAdapter.RecyclerViewHolder>
|
extends RecyclerView.Adapter<NearbyFilterSearchRecyclerViewAdapter.RecyclerViewHolder>
|
||||||
|
|
@ -121,11 +122,11 @@ public class NearbyFilterSearchRecyclerViewAdapter
|
||||||
results.count = labels.size();
|
results.count = labels.size();
|
||||||
results.values = labels;
|
results.values = labels;
|
||||||
} else {
|
} else {
|
||||||
constraint = constraint.toString().toLowerCase();
|
constraint = constraint.toString().toLowerCase(Locale.ROOT);
|
||||||
|
|
||||||
for (Label label : labels) {
|
for (Label label : labels) {
|
||||||
String data = label.toString();
|
String data = label.toString();
|
||||||
if (data.toLowerCase().startsWith(constraint.toString())) {
|
if (data.toLowerCase(Locale.ROOT).startsWith(constraint.toString())) {
|
||||||
filteredArrayList.add(Label.fromText(label.getText()));
|
filteredArrayList.add(Label.fromText(label.getText()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue