diff --git a/app/src/main/java/com/cringe_studios/code_guard/otplist/OTPListAdapter.java b/app/src/main/java/com/cringe_studios/code_guard/otplist/OTPListAdapter.java index 93afbd5..ae25528 100644 --- a/app/src/main/java/com/cringe_studios/code_guard/otplist/OTPListAdapter.java +++ b/app/src/main/java/com/cringe_studios/code_guard/otplist/OTPListAdapter.java @@ -233,9 +233,14 @@ public class OTPListAdapter extends RecyclerView.Adapter { query = query.toLowerCase(); - List allOTPs = new ArrayList<>(); - for(String group : SettingsUtil.getGroups(context)) { - allOTPs.addAll(OTPDatabase.getLoadedDatabase().getOTPs(group)); + List allOTPs; + if(!SettingsUtil.isSearchEverywhere(context)) { + allOTPs = items; + }else { + allOTPs = new ArrayList<>(); + for(String group : SettingsUtil.getGroups(context)) { + allOTPs.addAll(OTPDatabase.getLoadedDatabase().getOTPs(group)); + } } List filtered = new ArrayList<>();