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