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,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<>();