Fix search everywhere setting
This commit is contained in:
parent
e281506462
commit
8c089c4130
@ -233,10 +233,15 @@ public class OTPListAdapter extends RecyclerView.Adapter<OTPListItem> {
|
|||||||
|
|
||||||
query = query.toLowerCase();
|
query = query.toLowerCase();
|
||||||
|
|
||||||
List<OTPData> allOTPs = new ArrayList<>();
|
List<OTPData> allOTPs;
|
||||||
|
if(!SettingsUtil.isSearchEverywhere(context)) {
|
||||||
|
allOTPs = items;
|
||||||
|
}else {
|
||||||
|
allOTPs = new ArrayList<>();
|
||||||
for(String group : SettingsUtil.getGroups(context)) {
|
for(String group : SettingsUtil.getGroups(context)) {
|
||||||
allOTPs.addAll(OTPDatabase.getLoadedDatabase().getOTPs(group));
|
allOTPs.addAll(OTPDatabase.getLoadedDatabase().getOTPs(group));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<OTPData> filtered = new ArrayList<>();
|
List<OTPData> filtered = new ArrayList<>();
|
||||||
for(OTPData d : allOTPs) {
|
for(OTPData d : allOTPs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user