diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java b/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java index 5a6534e8..d8b395f6 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java @@ -257,7 +257,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter } public void editEntryTags(final int pos) { - final Entry entry = displayedEntries.get(pos); + final int realPos = getRealIndex(pos); + final Entry entry = entries.get(realPos); HashMap tagsHashMap = new HashMap<>(); for(String tag: entry.getTags()) { @@ -272,7 +273,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter final Callable tagsCallable = new Callable() { @Override public Object call() throws Exception { - entry.setTags(tagsAdapter.getActiveTags()); + entries.get(realPos).setTags(tagsAdapter.getActiveTags()); + DatabaseHelper.saveDatabase(context, entries); List inUseTags = getTags();