From fca3d9ffbcb2ecc8fb3c0ef8a6e85e36a2745213 Mon Sep 17 00:00:00 2001 From: Federico Iosue Date: Fri, 5 Jan 2024 09:06:04 +0100 Subject: [PATCH] Fixed tags search (closes #951) --- .../src/main/java/it/feio/android/omninotes/ListFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omniNotes/src/main/java/it/feio/android/omninotes/ListFragment.java b/omniNotes/src/main/java/it/feio/android/omninotes/ListFragment.java index 09a3b3139..7572e00fb 100644 --- a/omniNotes/src/main/java/it/feio/android/omninotes/ListFragment.java +++ b/omniNotes/src/main/java/it/feio/android/omninotes/ListFragment.java @@ -1821,8 +1821,8 @@ private void filterByTags() { .setPositiveButton(R.string.ok, (dialog, which) -> { var items = ((AlertDialog) dialog).getListView().getCheckedItemPositions(); var selectedTags = new ArrayList(); - for(int i = 0; i < items.size(); i++) { - if (items.valueAt(i)) { + for(int i = 0; i < tags.size(); i++) { + if (items.get(i)) { selectedTags.add(tags.get(i).getText()); } }