Fix search everywhere setting

This commit is contained in:
MrLetsplay 2024-04-27 16:50:30 +02:00
parent e281506462
commit 8c089c4130
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg

View File

@ -233,10 +233,15 @@ public class OTPListAdapter extends RecyclerView.Adapter<OTPListItem> {
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)) {
allOTPs.addAll(OTPDatabase.getLoadedDatabase().getOTPs(group));
}
}
List<OTPData> filtered = new ArrayList<>();
for(OTPData d : allOTPs) {